ported back a change from Tracker FSUtils.cpp

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25771 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval 2008-06-02 22:29:15 +00:00
parent 62572b22a6
commit 1d0b3c1590

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) {