aboutsummaryrefslogtreecommitdiff
path: root/Command
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2017-11-29 13:49:52 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2017-11-29 13:53:39 -0400
commitb7178922644c813a2cb69c185ca751aa234fa05b (patch)
tree770900f2dbdd269c5224eaf30ad42f0083732697 /Command
parent8c07e4dbf7d5145ed6412278c4288e3c405484ed (diff)
add gitAnnexTmpWorkDir and withTmpWorkDir
Needed to run youtube-dl in, but could also be useful for other stuff. The tricky part of this was making the workdir be cleaned up whenever the tmp object file is cleaned up. This commit was sponsored by Ole-Morten Duesund on Patreon.
Diffstat (limited to 'Command')
-rw-r--r--Command/DropUnused.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Command/DropUnused.hs b/Command/DropUnused.hs
index 840a8a472..c5a61d739 100644
--- a/Command/DropUnused.hs
+++ b/Command/DropUnused.hs
@@ -55,5 +55,5 @@ perform from numcopies key = case from of
performOther :: (Key -> Git.Repo -> FilePath) -> Key -> CommandPerform
performOther filespec key = do
f <- fromRepo $ filespec key
- liftIO $ nukeFile f
+ pruneTmpWorkDirBefore f (liftIO . nukeFile)
next $ return True