notice when an archive that was seen before gets deleted
This commit is contained in:
parent
523b7143e0
commit
df4942e179
1 changed files with 3 additions and 3 deletions
|
@ -140,14 +140,14 @@ listImportableContentsM u borgrepo = prompt $ do
|
||||||
ls <- withborglist borgrepo "{barchive}{NUL}" $ \as ->
|
ls <- withborglist borgrepo "{barchive}{NUL}" $ \as ->
|
||||||
forM as $ \archivename ->
|
forM as $ \archivename ->
|
||||||
case M.lookup archivename imported of
|
case M.lookup archivename imported of
|
||||||
Just getfast -> return $ Left getfast
|
Just getfast -> return $ Left (archivename, getfast)
|
||||||
Nothing -> Right <$>
|
Nothing -> Right <$>
|
||||||
let archive = borgArchive borgrepo archivename
|
let archive = borgArchive borgrepo archivename
|
||||||
in withborglist archive "{size}{NUL}{path}{NUL}" $
|
in withborglist archive "{size}{NUL}{path}{NUL}" $
|
||||||
liftIO . evaluate . force . parsefilelist archivename
|
liftIO . evaluate . force . parsefilelist archivename
|
||||||
if all isLeft ls
|
if all isLeft ls && M.null (M.difference imported (M.fromList (lefts ls)))
|
||||||
then return Nothing -- unchanged since last time, avoid work
|
then return Nothing -- unchanged since last time, avoid work
|
||||||
else Just . mkimportablecontents <$> mapM (either id pure) ls
|
else Just . mkimportablecontents <$> mapM (either snd pure) ls
|
||||||
where
|
where
|
||||||
withborglist what format a = do
|
withborglist what format a = do
|
||||||
let p = (proc "borg" ["list", what, "--format", format])
|
let p = (proc "borg" ["list", what, "--format", format])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue