diff options
author | Joey Hess <joey@kitenet.net> | 2013-02-14 14:10:36 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-02-14 14:15:26 -0400 |
commit | 177245deb6ee3271eb44d77c2b0cd722755b2c3f (patch) | |
tree | 876c4844937c831470192d367123f581fb6cc3d8 /Annex/Direct.hs | |
parent | 4e2d50d2e4c9b4d3487c24042b733d02c2f4dd46 (diff) |
crippled filesystem support, probing and initial support
git annex init probes for crippled filesystems, and sets direct mode, as
well as `annex.crippledfilesystem`.
Avoid manipulating permissions of files on crippled filesystems.
That would likely cause an exception to be thrown.
Very basic support in Command.Add for cripped filesystems; avoids the lock
down entirely since doing it needs both permissions and hard links.
Will make this better soon.
Diffstat (limited to 'Annex/Direct.hs')
-rw-r--r-- | Annex/Direct.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Annex/Direct.hs b/Annex/Direct.hs index 648bb7518..b33fef8bc 100644 --- a/Annex/Direct.hs +++ b/Annex/Direct.hs @@ -143,7 +143,7 @@ mergeDirectCleanup d oldsha newsha = do - Empty work tree directories are removed, per git behavior. -} moveout_raw f = liftIO $ do nukeFile f - void $ catchMaybeIO $ removeDirectory $ parentDir f + void $ tryIO $ removeDirectory $ parentDir f {- The symlink is created from the key, rather than moving in the - symlink created in the temp directory by the merge. This because @@ -161,7 +161,7 @@ mergeDirectCleanup d oldsha newsha = do - directory by the merge, and are moved to the real work tree. -} movein_raw f = liftIO $ do createDirectoryIfMissing True $ parentDir f - void $ catchMaybeIO $ rename (d </> f) f + void $ tryIO $ rename (d </> f) f {- If possible, converts a symlink in the working tree into a direct - mode file. -} @@ -203,7 +203,7 @@ removeDirect k f = do _ -> noop liftIO $ do nukeFile f - void $ catchMaybeIO $ removeDirectory $ parentDir f + void $ tryIO $ removeDirectory $ parentDir f {- Called when a direct mode file has been changed. Its old content may be - lost. -} |