Tracker: Fix #11193.

Fix regression introduced in commit 2f60dea5: BSymlink::ReadLink()
returns a byte count in the success case, which ThrowOnError() does
not anticipate. Consequently, attempts to copy symlinks would fail.
This commit is contained in:
Rene Gollent
2014-09-07 21:37:39 -04:00
parent 1819aa71ee
commit 360431e694
+3 -1
View File
@@ -1243,7 +1243,9 @@ LowLevelCopy(BEntry* srcEntry, StatStruct* srcStat, BDirectory* destDir,
char linkpath[MAXPATHLEN];
ThrowOnError(srcLink.SetTo(srcEntry));
ThrowOnError(srcLink.ReadLink(linkpath, MAXPATHLEN - 1));
ssize_t size = srcLink.ReadLink(linkpath, MAXPATHLEN - 1);
if (size < 0)
ThrowOnError(size);
ThrowOnError(destDir->CreateSymLink(destName, linkpath, &newLink));
node_ref destNodeRef;