forked from lix-project/lix
Merge pull request #4141 from volth/patch-11
Handle amount of disk space saved by hard linking being negative
This commit is contained in:
commit
7e44adda46
|
@ -683,7 +683,7 @@ void LocalStore::removeUnusedLinks(const GCState & state)
|
|||
struct stat st;
|
||||
if (stat(linksDir.c_str(), &st) == -1)
|
||||
throw SysError("statting '%1%'", linksDir);
|
||||
auto overhead = st.st_blocks * 512ULL;
|
||||
int64_t overhead = st.st_blocks * 512ULL;
|
||||
|
||||
printInfo("note: currently hard linking saves %.2f MiB",
|
||||
((unsharedSize - actualSize - overhead) / (1024.0 * 1024.0)));
|
||||
|
|
Loading…
Reference in a new issue