Tracker never copied zero-sized attributes.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22225 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2007-09-12 14:13:42 +00:00
parent 085296e86c
commit f0e6ea2160

View File

@ -1146,6 +1146,11 @@ CopyAttributes(CopyLoopControl *control, BNode *srcNode, BNode *destNode, void *
continue; continue;
} }
// Special case for a size 0 attribute. It wouldn't be written at all
// otherwise.
if (info.size == 0)
destNode->WriteAttr(name, info.type, 0, buffer, 0);
ssize_t bytes; ssize_t bytes;
ssize_t numToRead = (ssize_t)info.size; ssize_t numToRead = (ssize_t)info.size;
for (off_t offset = 0; numToRead > 0; offset += bytes) { for (off_t offset = 0; numToRead > 0; offset += bytes) {