summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Utility/Path.hs5
-rw-r--r--debian/changelog1
2 files changed, 5 insertions, 1 deletions
diff --git a/Utility/Path.hs b/Utility/Path.hs
index d21452efd..c3e893d16 100644
--- a/Utility/Path.hs
+++ b/Utility/Path.hs
@@ -21,6 +21,7 @@ import Control.Applicative
import qualified System.FilePath.Posix as Posix
#else
import System.Posix.Files
+import Utility.Exception
#endif
import qualified "MissingH" System.Path as MissingH
@@ -255,7 +256,9 @@ fileNameLengthLimit :: FilePath -> IO Int
fileNameLengthLimit _ = return 255
#else
fileNameLengthLimit dir = do
- l <- fromIntegral <$> getPathVar dir FileNameLimit
+ -- getPathVar can fail due to statfs(2) overflow
+ l <- catchDefaultIO 0 $
+ fromIntegral <$> getPathVar dir FileNameLimit
if l <= 0
then return 255
else return $ minimum [l, 255]
diff --git a/debian/changelog b/debian/changelog
index 63b2adf36..6c1bad91b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
git-annex (5.20141220) UNRELEASED; urgency=medium
* vicfg: Avoid crashing on badly encoded config data.
+ * Work around statfs() overflow on some XFS systems.
-- Joey Hess <id@joeyh.name> Mon, 22 Dec 2014 15:16:38 -0400