stop the copy when not everything is written

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18724 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval
2006-08-31 12:21:57 +00:00
parent 915367e31a
commit b206bbe1d8
+1 -1
View File
@@ -168,7 +168,7 @@ copy_attributes(int fromFd, int toFd)
break;
bytesWritten = fs_write_attr(toFd, dirent->d_name, info.type, pos, buffer, bytesRead);
if (bytesWritten <= 0)
if (bytesWritten != bytesRead)
break;
pos += bytesWritten;