fix
This commit is contained in:
parent
86a4b56db3
commit
d961985679
1 changed files with 8 additions and 5 deletions
|
@ -353,10 +353,18 @@ driveList :: IO [RemovableDrive]
|
||||||
-- Could use wmic, but it only works for administrators.
|
-- Could use wmic, but it only works for administrators.
|
||||||
driveList = return $ map (\l -> gen $ l:":") ['A'..'Z']
|
driveList = return $ map (\l -> gen $ l:":") ['A'..'Z']
|
||||||
where
|
where
|
||||||
|
gen dir = RemovableDrive
|
||||||
|
Nothing
|
||||||
|
(T.pack dir)
|
||||||
|
(T.pack gitAnnexAssistantDefaultDir)
|
||||||
#else
|
#else
|
||||||
#ifdef WITH_CLIBS
|
#ifdef WITH_CLIBS
|
||||||
driveList = mapM (gen . mnt_dir) =<< filter sane <$> getMounts
|
driveList = mapM (gen . mnt_dir) =<< filter sane <$> getMounts
|
||||||
where
|
where
|
||||||
|
gen dir = RemovableDrive
|
||||||
|
<$> getDiskFree dir
|
||||||
|
<*> pure (T.pack dir)
|
||||||
|
<*> pure (T.pack gitAnnexAssistantDefaultDir)
|
||||||
-- filter out some things that are surely not removable drives
|
-- filter out some things that are surely not removable drives
|
||||||
sane Mntent { mnt_dir = dir, mnt_fsname = dev }
|
sane Mntent { mnt_dir = dir, mnt_fsname = dev }
|
||||||
{- We want real disks like /dev/foo, not
|
{- We want real disks like /dev/foo, not
|
||||||
|
@ -376,13 +384,8 @@ driveList = mapM (gen . mnt_dir) =<< filter sane <$> getMounts
|
||||||
| otherwise = True
|
| otherwise = True
|
||||||
#else
|
#else
|
||||||
driveList = return []
|
driveList = return []
|
||||||
where
|
|
||||||
#endif
|
#endif
|
||||||
#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
|
{- Bootstraps from first run mode to a fully running assistant in a
|
||||||
- repository, by running the postFirstRun callback, which returns the
|
- repository, by running the postFirstRun callback, which returns the
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue