convert listImportableContents to throwing exceptions
This commit is contained in:
parent
5d8e4a7c74
commit
e1ac42be77
8 changed files with 27 additions and 27 deletions
|
@ -132,7 +132,7 @@ borgLocal = notElem ':'
|
|||
-- XXX the tree generated by using this does not seem to get grafted into
|
||||
-- the git-annex branch, so would be subject to being lost to GC.
|
||||
-- Is this a general problem affecting importtree too?
|
||||
listImportableContentsM :: UUID -> BorgRepo -> Annex (Maybe (ImportableContents (ContentIdentifier, ByteSize)))
|
||||
listImportableContentsM :: UUID -> BorgRepo -> Annex (ImportableContents (ContentIdentifier, ByteSize))
|
||||
listImportableContentsM u borgrepo = prompt $ do
|
||||
imported <- getImported u
|
||||
ls <- withborglist borgrepo "{barchive}{NUL}" $ \as ->
|
||||
|
@ -143,7 +143,7 @@ listImportableContentsM u borgrepo = prompt $ do
|
|||
let archive = borgrepo ++ "::" ++ decodeBS' archivename
|
||||
in withborglist archive "{size}{NUL}{path}{NUL}" $
|
||||
liftIO . evaluate . force . parsefilelist archivename
|
||||
return $ Just $ mkimportablecontents ls
|
||||
return $ mkimportablecontents ls
|
||||
where
|
||||
withborglist what format a = do
|
||||
let p = (proc "borg" ["list", what, "--format", format])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue