summaryrefslogtreecommitdiff
path: root/Command/Vicfg.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-12-18 12:19:24 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-12-18 12:19:24 -0400
commit2dd79ffb3c58ac881e9def90d0125cf5f9ffb958 (patch)
treefeed6f99b682f026ccac4bfc105f7827dba4df2a /Command/Vicfg.hs
parentd5e028d797e871532693867c4161d9d0aaec0f90 (diff)
vicfg: Quote filename. Closes: #696193
Diffstat (limited to 'Command/Vicfg.hs')
-rw-r--r--Command/Vicfg.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Command/Vicfg.hs b/Command/Vicfg.hs
index cfe051c4e..8aefd86bb 100644
--- a/Command/Vicfg.hs
+++ b/Command/Vicfg.hs
@@ -44,7 +44,7 @@ vicfg :: Cfg -> FilePath -> Annex ()
vicfg curcfg f = do
vi <- liftIO $ catchDefaultIO "vi" $ getEnv "EDITOR"
-- Allow EDITOR to be processed by the shell, so it can contain options.
- unlessM (liftIO $ boolSystem "sh" [Param "-c", Param $ unwords [vi, f]]) $
+ unlessM (liftIO $ boolSystem "sh" [Param "-c", Param $ unwords [vi, shellEscape f]]) $
error $ vi ++ " exited nonzero; aborting"
r <- parseCfg curcfg <$> liftIO (readFileStrict f)
liftIO $ nukeFile f