diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-01-09 13:11:56 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-01-09 13:11:56 -0400 |
commit | 425bc1107aebdb701cdcee44da731dd918cd470d (patch) | |
tree | 25bcacb37277b70aa7bd0caaf0fe7c3edc665653 /Annex/Content.hs | |
parent | 20c7644a4d85434cf49840ea92fca0c723710c72 (diff) |
revert parentDir change
Reverts 2bba5bc22d049272d3328bfa6c452d3e2e50e86c
Unfortunately, this caused breakage on Windows, and possibly elsewhere,
because parentDir and takeDirectory do not behave the same when there is a
trailing directory separator.
Diffstat (limited to 'Annex/Content.hs')
-rw-r--r-- | Annex/Content.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Annex/Content.hs b/Annex/Content.hs index 2d52dcefb..37090d3bb 100644 --- a/Annex/Content.hs +++ b/Annex/Content.hs @@ -261,7 +261,7 @@ finishGetViaTmp check key action = do prepTmp :: Key -> Annex FilePath prepTmp key = do tmp <- fromRepo $ gitAnnexTmpObjectLocation key - createAnnexDirectory (takeDirectory tmp) + createAnnexDirectory (parentDir tmp) return tmp {- Creates a temp file for a key, runs an action on it, and cleans up @@ -425,7 +425,7 @@ cleanObjectLoc key cleaner = do where removeparents _ 0 = noop removeparents file n = do - let dir = takeDirectory file + let dir = parentDir file maybe noop (const $ removeparents dir (n-1)) <=< catchMaybeIO $ removeDirectory dir @@ -474,7 +474,7 @@ moveBad key = do src <- calcRepo $ gitAnnexLocation key bad <- fromRepo gitAnnexBadDir let dest = bad </> takeFileName src - createAnnexDirectory (takeDirectory dest) + createAnnexDirectory (parentDir dest) cleanObjectLoc key $ liftIO $ moveFile src dest logStatus key InfoMissing |