- Moved creation of the CD:cddbid attribute to after the saved attributes are restored.

- Only adds it if it does not exist yet.

This does not change anything but makes more sense anyway.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27073 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Bruno G. Albuquerque 2008-08-20 01:51:23 +00:00
parent 7c1b58f2bb
commit d4969c919a
1 changed files with 7 additions and 4 deletions

View File

@ -247,6 +247,8 @@ struct file_cookie {
static const uint32 kMaxAttributeSize = 65536;
static const uint32 kMaxAttributes = 64;
static const char* kCddbIdAttribute = "CD:cddbid";
extern fs_volume_ops gCDDAVolumeOps;
extern fs_vnode_ops gCDDAVnodeOps;
@ -568,10 +570,6 @@ Volume::Mount(const char* device)
return status;
}
// add CD:cddbid attribute.
fRootNode->AddAttribute("CD:cddbid", B_UINT32_TYPE, true,
(const uint8 *)&fDiscID, 4);
cdtext text;
if (read_cdtext(fDevice, text) < B_OK)
dprintf("CDDA: no CD-Text found.\n");
@ -639,6 +637,11 @@ Volume::Mount(const char* device)
_RestoreSharedAttributes();
_RestoreAttributes();
// Only add CD:cddbid attribute if it does not exist yet.
if (fRootNode->FindAttribute(kCddbIdAttribute) == NULL)
fRootNode->AddAttribute(kCddbIdAttribute, B_UINT32_TYPE, true,
(const uint8 *)&fDiscID, 4);
free(toc);
// determine volume title