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
1 changed files with 5 additions and 0 deletions

View File

@ -1146,6 +1146,11 @@ CopyAttributes(CopyLoopControl *control, BNode *srcNode, BNode *destNode, void *
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 numToRead = (ssize_t)info.size;
for (off_t offset = 0; numToRead > 0; offset += bytes) {