support XDG_DATA_DIR

This commit is contained in:
Joey Hess 2012-08-02 07:47:39 -04:00
parent adf5789c1b
commit 112ce4f49c

View file

@ -111,8 +111,10 @@ defaultRepositoryPath firstrun = do
cwd <- liftIO $ getCurrentDirectory
home <- myHomeDir
if home == cwd && firstrun
then ifM (doesDirectoryExist $ home </> "Desktop")
(return "~/Desktop/annex", return "~/annex")
then do
desktop <- userDesktopDir
ifM (doesDirectoryExist desktop)
(relHome (desktop </> "annex"), return "~/annex")
else return cwd
addRepositoryForm :: Form RepositoryPath