diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-08-07 16:22:54 -0400 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-08-07 16:22:54 -0400 |
commit | 325d1cfebf6c8ad391dc318f984feb3e5731aa5a (patch) | |
tree | ae62db8bf6baa62dc559185d972a41dbc14be81b /src/libstore | |
parent | d025142f529731f05868f5397f5617011963c8b4 (diff) |
Don't warn about maximum link count exceeded on 0-byte files
Diffstat (limited to 'src/libstore')
-rw-r--r-- | src/libstore/optimise-store.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libstore/optimise-store.cc b/src/libstore/optimise-store.cc index 35c8dd48f..137547a8a 100644 --- a/src/libstore/optimise-store.cc +++ b/src/libstore/optimise-store.cc @@ -156,7 +156,8 @@ void LocalStore::optimisePath_(OptimiseStats & stats, const Path & path) /* Too many links to the same file (>= 32000 on most file systems). This is likely to happen with empty files. Just shrug and ignore. */ - printMsg(lvlInfo, format("`%1%' has maximum number of links") % linkPath); + if (st.st_size) + printMsg(lvlInfo, format("`%1%' has maximum number of links") % linkPath); return; } if (errno == EPERM) continue; @@ -172,7 +173,8 @@ void LocalStore::optimisePath_(OptimiseStats & stats, const Path & path) rename, rather than on the original link. (Probably it temporarily increases the st_nlink field before decreasing it again.) */ - printMsg(lvlInfo, format("`%1%' has maximum number of links") % linkPath); + if (st.st_size) + printMsg(lvlInfo, format("`%1%' has maximum number of links") % linkPath); return; } if (errno == EPERM) continue; |