more RawFilePath conversion
This commit was sponsored by Luke Shumaker on Patreon.
This commit is contained in:
parent
b724236b35
commit
55400a03d3
22 changed files with 91 additions and 79 deletions
|
@ -21,7 +21,7 @@ seek = withWords (commandAction . start)
|
|||
|
||||
start :: [String] -> CommandStart
|
||||
start ps@(keyname:file:[]) = starting "setkey" ai si $
|
||||
perform file (keyOpt keyname)
|
||||
perform (toRawFilePath file) (keyOpt keyname)
|
||||
where
|
||||
ai = ActionItemOther (Just file)
|
||||
si = SeekInput ps
|
||||
|
@ -30,7 +30,7 @@ start _ = giveup "specify a key and a content file"
|
|||
keyOpt :: String -> Key
|
||||
keyOpt = fromMaybe (giveup "bad key") . deserializeKey
|
||||
|
||||
perform :: FilePath -> Key -> CommandPerform
|
||||
perform :: RawFilePath -> Key -> CommandPerform
|
||||
perform file key = do
|
||||
-- the file might be on a different filesystem, so moveFile is used
|
||||
-- rather than simply calling moveAnnex; disk space is also
|
||||
|
@ -38,7 +38,7 @@ perform file key = do
|
|||
ok <- getViaTmp RetrievalAllKeysSecure DefaultVerify key $ \dest -> unVerified $
|
||||
if dest /= file
|
||||
then liftIO $ catchBoolIO $ do
|
||||
moveFile file dest
|
||||
moveFile (fromRawFilePath file) (fromRawFilePath dest)
|
||||
return True
|
||||
else return True
|
||||
if ok
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue