misctmp cleanup
* Switch to using .git/annex/othertmp for tmp files other than partial downloads, and make stale files left in that directory when git-annex is interrupted be cleaned up promptly by subsequent git-annex processes. * The .git/annex/misctmp directory is no longer used and git-annex will delete anything lingering in there after it's 1 week old. Also, in Annex.Ingest, made the filename it uses in the tmp dir be prefixed with "ingest-" to avoid potentially using a filename used by some other code.
This commit is contained in:
parent
6de8ce8bb1
commit
d5f2463702
22 changed files with 222 additions and 156 deletions
|
@ -12,6 +12,7 @@ import Config
|
|||
import Utility.Tmp.Dir
|
||||
import Utility.Env
|
||||
import Annex.Direct
|
||||
import Annex.Tmp
|
||||
import qualified Git
|
||||
import qualified Git.Sha
|
||||
import qualified Git.Ref
|
||||
|
@ -32,9 +33,7 @@ seek = withWords (commandAction . start)
|
|||
start :: [String] -> CommandStart
|
||||
start [] = giveup "Did not specify command to run."
|
||||
start (c:ps) = liftIO . exitWith =<< ifM isDirect
|
||||
( do
|
||||
tmp <- gitAnnexTmpMiscDir <$> gitRepo
|
||||
withTmpDirIn tmp "proxy" go
|
||||
( withOtherTmp $ \tmp -> withTmpDirIn tmp "proxy" go
|
||||
, liftIO $ safeSystem c (map Param ps)
|
||||
)
|
||||
where
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue