diff options
author | Joey Hess <joey@kitenet.net> | 2011-02-25 01:13:01 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-02-25 01:13:01 -0400 |
commit | 836e71297b8e3b5bd6f89f7eb1198f59af985b0b (patch) | |
tree | 835db9db776b23552736422baf9794eb6a3ac5e5 /Command | |
parent | e61b47bc8a51447f9fbde6463e09d4beef8d5a7f (diff) |
Support filenames that start with a dash; when such a file is passed to a utility it will be escaped to avoid it being interpreted as an option.
Diffstat (limited to 'Command')
-rw-r--r-- | Command/SetKey.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Command/SetKey.hs b/Command/SetKey.hs index 388392cd6..025fb74d6 100644 --- a/Command/SetKey.hs +++ b/Command/SetKey.hs @@ -35,7 +35,8 @@ perform file = do -- rather than simply calling moveToObjectDir ok <- getViaTmp key $ \dest -> do if dest /= file - then liftIO $ boolSystem "mv" [file, dest] + then liftIO $ + boolSystem "mv" [utilityEscape file, utilityEscape dest] else return True if ok then return $ Just $ cleanup |