don't crash on upgrade if .git-annex DNE
This commit is contained in:
parent
1de3cbbef1
commit
43b3675d42
1 changed files with 6 additions and 2 deletions
|
@ -115,8 +115,12 @@ moveLocationLogs = do
|
|||
oldlocationlogs = do
|
||||
g <- Annex.gitRepo
|
||||
let dir = gitStateDir g
|
||||
contents <- liftIO $ getDirectoryContents dir
|
||||
return $ catMaybes $ map oldlog2key contents
|
||||
exists <- liftIO $ doesDirectoryExist dir
|
||||
if exists
|
||||
then do
|
||||
contents <- liftIO $ getDirectoryContents dir
|
||||
return $ catMaybes $ map oldlog2key contents
|
||||
else return []
|
||||
move (l, k) = do
|
||||
g <- Annex.gitRepo
|
||||
let dest = logFile g k
|
||||
|
|
Loading…
Reference in a new issue