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
|
||||
cwd <- liftIO getCurrentDirectory
|
||||
home <- myHomeDir
|
||||
#ifndef mingw32_HOST_OS
|
||||
if home == cwd && firstrun
|
||||
then inhome
|
||||
else ifM (legit cwd <&&> canWrite cwd)
|
||||
( return cwd
|
||||
, inhome
|
||||
)
|
||||
#else
|
||||
-- Windows user can probably write anywhere, so always default
|
||||
-- to ~/Desktop/annex.
|
||||
inhome
|
||||
#endif
|
||||
where
|
||||
inhome = do
|
||||
desktop <- userDesktopDir
|
||||
|
|
Loading…
Reference in a new issue