summaryrefslogtreecommitdiff
path: root/Annex
diff options
context:
space:
mode:
Diffstat (limited to 'Annex')
-rw-r--r--Annex/Init.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Annex/Init.hs b/Annex/Init.hs
index fad533d13..5759adffc 100644
--- a/Annex/Init.hs
+++ b/Annex/Init.hs
@@ -138,8 +138,10 @@ probeCrippledFileSystem = do
createSymbolicLink f f2
nukeFile f2
preventWrite f
- -- Should be unable to write to the file, but some crippled
+ -- Should be unable to write to the file, unless
+ -- running as root, but some crippled
-- filesystems ignore write bit removals.
+ unlessM
not <$> catchBoolIO (writeFile f "2" >> return True)
#endif