better default annex location on windows
This commit is contained in:
parent
fc3a9a8adb
commit
51b43f2b68
1 changed files with 6 additions and 0 deletions
|
@ -116,12 +116,18 @@ defaultRepositoryPath :: Bool -> IO FilePath
|
||||||
defaultRepositoryPath firstrun = do
|
defaultRepositoryPath firstrun = do
|
||||||
cwd <- liftIO getCurrentDirectory
|
cwd <- liftIO getCurrentDirectory
|
||||||
home <- myHomeDir
|
home <- myHomeDir
|
||||||
|
#ifndef mingw32_HOST_OS
|
||||||
if home == cwd && firstrun
|
if home == cwd && firstrun
|
||||||
then inhome
|
then inhome
|
||||||
else ifM (legit cwd <&&> canWrite cwd)
|
else ifM (legit cwd <&&> canWrite cwd)
|
||||||
( return cwd
|
( return cwd
|
||||||
, inhome
|
, inhome
|
||||||
)
|
)
|
||||||
|
#else
|
||||||
|
-- Windows user can probably write anywhere, so always default
|
||||||
|
-- to ~/Desktop/annex.
|
||||||
|
inhome
|
||||||
|
#endif
|
||||||
where
|
where
|
||||||
inhome = do
|
inhome = do
|
||||||
desktop <- userDesktopDir
|
desktop <- userDesktopDir
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue