diff --git a/Assistant/WebApp/Configurators/Local.hs b/Assistant/WebApp/Configurators/Local.hs index 43a088a7b2..e0cb5ce264 100644 --- a/Assistant/WebApp/Configurators/Local.hs +++ b/Assistant/WebApp/Configurators/Local.hs @@ -124,17 +124,20 @@ defaultRepositoryPath firstrun = do , inhome ) #else - -- Windows user can probably write anywhere, so always default - -- to ~/Desktop/annex. + -- On Windows, always default to ~/Desktop/annex or ~/annex, + -- no cwd handling because the user might be able to write + -- to the entire drive. inhome #endif where inhome = do desktop <- userDesktopDir - ifM (doesDirectoryExist desktop) + ifM (doesDirectoryExist desktop <&&> canWrite desktop) ( relHome $ desktop gitAnnexAssistantDefaultDir , return $ "~" gitAnnexAssistantDefaultDir ) + -- Avoid using eg, standalone build's git-annex.linux/ directory + -- when run from there. legit d = not <$> doesFileExist (d "git-annex") newRepositoryForm :: FilePath -> Hamlet.Html -> MkMForm RepositoryPath diff --git a/doc/bugs/__39__Cannot_write_a_repository_there__39___on_Windows.mdwn b/doc/bugs/__39__Cannot_write_a_repository_there__39___on_Windows.mdwn index 0eed95b3e2..62ad4a15f9 100644 --- a/doc/bugs/__39__Cannot_write_a_repository_there__39___on_Windows.mdwn +++ b/doc/bugs/__39__Cannot_write_a_repository_there__39___on_Windows.mdwn @@ -24,3 +24,9 @@ Windows 7 64-bit [[!format sh """ Launching web browser on file://C:\Users\bbigras\AppData\Local\Temp\webapp9924.html """]] + +> It checks if the directory can be written to, and it seems that for some +> reason Windows is preventing you from writing to your Desktop. That seems +> really weird to me (and I have not seen that behavior). But, I can easily +> make it check if that's the case, and fall back to the other path, so +> have done so. [[done]] --[[Joey]]