diff options
author | Joey Hess <joey@kitenet.net> | 2011-02-28 16:10:16 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-02-28 16:18:55 -0400 |
commit | fcdc4797a9ab2b792a9bb20f2ca9802b8f6d5a1e (patch) | |
tree | 0471848c11df7c1481d8c735eab1280d7684eddc /Command/Move.hs | |
parent | 7e5678bcf7cd78bd04520117201be37dc9d4d544 (diff) |
use ShellParam type
So, I have a type checked safe handling of filenames starting with dashes,
throughout the code.
Diffstat (limited to 'Command/Move.hs')
-rw-r--r-- | Command/Move.hs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Command/Move.hs b/Command/Move.hs index 6dc2e4874..8c19539fb 100644 --- a/Command/Move.hs +++ b/Command/Move.hs @@ -56,7 +56,7 @@ remoteHasKey remote key present = do g <- Annex.gitRepo remoteuuid <- getUUID remote logfile <- liftIO $ logChange g key remoteuuid status - Annex.queue "add" ["--"] logfile + Annex.queue "add" [Param "--"] logfile where status = if present then ValuePresent else ValueMissing @@ -130,9 +130,10 @@ fromPerform src move key = do fromCleanup :: Git.Repo -> Bool -> Key -> CommandCleanup fromCleanup src True key = do ok <- Remotes.onRemote src (boolSystem, False) "dropkey" - ["--quiet", "--force", - "--backend=" ++ backendName key, - keyName key] + [ Params "--quiet --force" + , Param $ "--backend=" ++ backendName key + , Param $ keyName key + ] -- better safe than sorry: assume the src dropped the key -- even if it seemed to fail; the failure could have occurred -- after it really dropped it |