webapp: Fix crash adding removable drive that has an annex directory in it that is not a git repository.
This commit is contained in:
parent
06aae8fe74
commit
13aaf69cdb
3 changed files with 9 additions and 3 deletions
|
@ -199,10 +199,10 @@ getAddDriveR = page "Add a removable drive" (Just Configuration) $ do
|
|||
{- The repo may already exist, when adding removable media
|
||||
- that has already been used elsewhere. -}
|
||||
makerepo dir = liftIO $ do
|
||||
r <- E.try (inDir dir $ return True) :: IO (Either E.SomeException Bool)
|
||||
r <- E.try (inDir dir $ getUUID) :: IO (Either E.SomeException UUID)
|
||||
case r of
|
||||
Right _ -> noop
|
||||
Left _e -> do
|
||||
Right u | u /= NoUUID -> noop
|
||||
_ -> do
|
||||
createDirectoryIfMissing True dir
|
||||
makeRepo dir True
|
||||
{- Each repository is made a remote of the other. -}
|
||||
|
|
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -6,6 +6,8 @@ git-annex (3.20130115) UNRELEASED; urgency=low
|
|||
Closes: #698184
|
||||
* webapp: Now always logs to .git/annex/daemon.log
|
||||
* webapp: Has a page to view the log, accessed from the control menu.
|
||||
* webapp: Fix crash adding removable drive that has an annex directory
|
||||
in it that is not a git repository.
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Mon, 14 Jan 2013 18:35:01 -0400
|
||||
|
||||
|
|
|
@ -19,3 +19,7 @@ git-annex version 3.20130107, OS X Mountain Lion. No MacPorts/homebrew/fink inst
|
|||
Please provide any additional information below.
|
||||
|
||||
Maybe something to do with the drive name having spaces? "/Volumes/git-annex" worked fine.
|
||||
|
||||
> Good thought in the comment. I was able to reproduce the failure
|
||||
> if the removable drive already had an "annex" directory that was not
|
||||
> a git repo. I've made it handle this case. [[done]] --[[Joey]]
|
||||
|
|
Loading…
Reference in a new issue