Support upgrading from a v0 annex with nothing in it.
This commit is contained in:
parent
c4a357d5d1
commit
eedebb0057
2 changed files with 8 additions and 3 deletions
10
Upgrade.hs
10
Upgrade.hs
|
@ -67,9 +67,13 @@ upgradeFrom0 = do
|
|||
|
||||
getKeysPresent0' :: FilePath -> Annex [Key]
|
||||
getKeysPresent0' dir = do
|
||||
contents <- liftIO $ getDirectoryContents dir
|
||||
files <- liftIO $ filterM present contents
|
||||
return $ map fileKey files
|
||||
exists <- liftIO $ doesDirectoryExist dir
|
||||
if (not exists)
|
||||
then return []
|
||||
else do
|
||||
contents <- liftIO $ getDirectoryContents dir
|
||||
files <- liftIO $ filterM present contents
|
||||
return $ map fileKey files
|
||||
where
|
||||
present d = do
|
||||
result <- try $
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue