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
|
oldlocationlogs = do
|
||||||
g <- Annex.gitRepo
|
g <- Annex.gitRepo
|
||||||
let dir = gitStateDir g
|
let dir = gitStateDir g
|
||||||
contents <- liftIO $ getDirectoryContents dir
|
exists <- liftIO $ doesDirectoryExist dir
|
||||||
return $ catMaybes $ map oldlog2key contents
|
if exists
|
||||||
|
then do
|
||||||
|
contents <- liftIO $ getDirectoryContents dir
|
||||||
|
return $ catMaybes $ map oldlog2key contents
|
||||||
|
else return []
|
||||||
move (l, k) = do
|
move (l, k) = do
|
||||||
g <- Annex.gitRepo
|
g <- Annex.gitRepo
|
||||||
let dest = logFile g k
|
let dest = logFile g k
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue