aboutsummaryrefslogtreecommitdiff
path: root/Config
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-06-11 00:06:06 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-06-11 00:06:06 -0400
commit8a845cd656bc531b83f183188597f6e411d98fde (patch)
tree44779de50568de6bd5eb9a84e0565d2e265415b3 /Config
parent3e8bef013d781f3b3f549c5b4b74c497f8b71394 (diff)
webapp: When the user switches to display a different repository, that repository becomes the default repository to be displayed next time the webapp gets started.
Diffstat (limited to 'Config')
-rw-r--r--Config/Files.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Config/Files.hs b/Config/Files.hs
index 23564c2df..3db2bb74c 100644
--- a/Config/Files.hs
+++ b/Config/Files.hs
@@ -36,7 +36,9 @@ modifyAutoStartFile func = do
createDirectoryIfMissing True (parentDir f)
viaTmp writeFile f $ unlines $ dirs'
-{- Adds a directory to the autostart file. -}
+{- Adds a directory to the autostart file. If the directory is already
+ - present, it's moved to the top, so it will be used as the default
+ - when opening the webapp. -}
addAutoStartFile :: FilePath -> IO ()
addAutoStartFile path = modifyAutoStartFile $ (:) path