diff --git a/Assistant/WebApp/Configurators/Local.hs b/Assistant/WebApp/Configurators/Local.hs index af4dd19958..37fca5738d 100644 --- a/Assistant/WebApp/Configurators/Local.hs +++ b/Assistant/WebApp/Configurators/Local.hs @@ -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. -} diff --git a/debian/changelog b/debian/changelog index 351ad3f888..652752fd03 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Mon, 14 Jan 2013 18:35:01 -0400 diff --git a/doc/bugs/Internal_server_error_adding_USB_drive_on_OS_X.mdwn b/doc/bugs/Internal_server_error_adding_USB_drive_on_OS_X.mdwn index c2fbc98fa1..575a636840 100644 --- a/doc/bugs/Internal_server_error_adding_USB_drive_on_OS_X.mdwn +++ b/doc/bugs/Internal_server_error_adding_USB_drive_on_OS_X.mdwn @@ -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]]