try all drive letters

This commit is contained in:
Joey Hess 2013-12-09 16:56:52 -04:00
parent 2066e90421
commit 4866ec84df

View file

@ -348,6 +348,9 @@ getEnableDirectoryR uuid = page "Enable a repository" (Just Configuration) $ do
{- List of removable drives. -}
driveList :: IO [RemovableDrive]
#ifdef mingw32_HOST_OS
driveList = return $ map (:":") ['A'..'Z']
#else
#ifdef WITH_CLIBS
driveList = mapM (gen . mnt_dir) =<< filter sane <$> getMounts
where
@ -375,6 +378,7 @@ driveList = mapM (gen . mnt_dir) =<< filter sane <$> getMounts
#else
driveList = return []
#endif
#endif
{- Bootstraps from first run mode to a fully running assistant in a
- repository, by running the postFirstRun callback, which returns the