Improved temp file handling
* Improved temp file handling. Transfers of content can now be resumed from temp files later; the resume does not have to be the immediate next git-annex run. * unused: Include partially transferred content in the list.
This commit is contained in:
parent
04fe906ac6
commit
e6da7eb177
8 changed files with 87 additions and 40 deletions
10
CmdLine.hs
10
CmdLine.hs
|
@ -105,13 +105,3 @@ shutdown errnum = do
|
|||
unless (q == GitQueue.empty) $ do
|
||||
showSideAction "Recording state in git..."
|
||||
Annex.queueRun
|
||||
|
||||
-- If nothing failed, clean up any files left in the temp directory,
|
||||
-- but leave the directory itself. If something failed, temp files
|
||||
-- are left behind to allow resuming on re-run.
|
||||
when (errnum == 0) $ do
|
||||
g <- Annex.gitRepo
|
||||
let tmp = gitAnnexTmpDir g
|
||||
exists <- liftIO $ doesDirectoryExist tmp
|
||||
when exists $ liftIO $ removeDirectoryRecursive tmp
|
||||
liftIO $ createDirectoryIfMissing True tmp
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue