From d9619856799d799c5d0d888672763ee3aa694f66 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 9 Dec 2013 17:13:37 -0400 Subject: [PATCH] fix --- Assistant/WebApp/Configurators/Local.hs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Assistant/WebApp/Configurators/Local.hs b/Assistant/WebApp/Configurators/Local.hs index 9bfb2e7f96..b1fc803aa9 100644 --- a/Assistant/WebApp/Configurators/Local.hs +++ b/Assistant/WebApp/Configurators/Local.hs @@ -353,10 +353,18 @@ driveList :: IO [RemovableDrive] -- Could use wmic, but it only works for administrators. driveList = return $ map (\l -> gen $ l:":") ['A'..'Z'] where + gen dir = RemovableDrive + Nothing + (T.pack dir) + (T.pack gitAnnexAssistantDefaultDir) #else #ifdef WITH_CLIBS driveList = mapM (gen . mnt_dir) =<< filter sane <$> getMounts where + gen dir = RemovableDrive + <$> getDiskFree dir + <*> pure (T.pack dir) + <*> pure (T.pack gitAnnexAssistantDefaultDir) -- filter out some things that are surely not removable drives sane Mntent { mnt_dir = dir, mnt_fsname = dev } {- We want real disks like /dev/foo, not @@ -376,13 +384,8 @@ driveList = mapM (gen . mnt_dir) =<< filter sane <$> getMounts | otherwise = True #else driveList = return [] - where #endif #endif - gen dir = RemovableDrive - <$> getDiskFree dir - <*> pure (T.pack dir) - <*> pure (T.pack gitAnnexAssistantDefaultDir) {- Bootstraps from first run mode to a fully running assistant in a - repository, by running the postFirstRun callback, which returns the