aboutsummaryrefslogtreecommitdiff
path: root/Command/Assistant.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-10-14 15:19:34 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-10-14 15:19:34 -0400
commita4fe8365f3745033a307817e754f132357af47f7 (patch)
treeb42a44eb4bc2a1b31752c5e654e72a2f09f4dc3f /Command/Assistant.hs
parent19a173cfadf0cdccbe371772d341a75642dc6273 (diff)
nub the autostart file
It's possible for the file to get duplicate lines in it, and if so, we want to ignore the dups.
Diffstat (limited to 'Command/Assistant.hs')
-rw-r--r--Command/Assistant.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Command/Assistant.hs b/Command/Assistant.hs
index 53f7e4baf..b039e2731 100644
--- a/Command/Assistant.hs
+++ b/Command/Assistant.hs
@@ -54,7 +54,7 @@ autoStart = do
let nothing = error $ "Nothing listed in " ++ autostartfile
ifM (doesFileExist autostartfile)
( do
- dirs <- lines <$> readFile autostartfile
+ dirs <- nub . lines <$> readFile autostartfile
program <- readProgramFile
when (null dirs) nothing
forM_ dirs $ \d -> do