more OsPath conversion
Sponsored-by: Leon Schuermann
This commit is contained in:
parent
ee0964e61b
commit
f3539efc16
18 changed files with 156 additions and 153 deletions
|
@ -70,7 +70,7 @@ newtype Armoring = Armoring Bool
|
|||
- The directory does not really have to be empty, it just needs to be one
|
||||
- that should not contain any files with names starting with "@".
|
||||
-}
|
||||
newtype EmptyDirectory = EmptyDirectory FilePath
|
||||
newtype EmptyDirectory = EmptyDirectory OsPath
|
||||
|
||||
{- Encrypt using symmetric encryption with the specified password. -}
|
||||
encryptSymmetric
|
||||
|
@ -112,7 +112,7 @@ decryptSymmetric sopcmd password emptydirectory feeder reader =
|
|||
{- Test a value round-trips through symmetric encryption and decryption. -}
|
||||
test_encrypt_decrypt_Symmetric :: SOPCmd -> SOPCmd -> Password -> Armoring -> B.ByteString -> IO Bool
|
||||
test_encrypt_decrypt_Symmetric a b password armoring v = catchBoolIO $
|
||||
withTmpDir (toOsPath "test") $ \d -> do
|
||||
withTmpDir (literalOsPath "test") $ \d -> do
|
||||
let ed = EmptyDirectory d
|
||||
enc <- encryptSymmetric a password ed Nothing armoring
|
||||
(`B.hPutStr` v) B.hGetContents
|
||||
|
@ -188,7 +188,7 @@ feedRead' (SOPCmd cmd) subcmd params med feeder reader = do
|
|||
, std_out = CreatePipe
|
||||
, std_err = Inherit
|
||||
, cwd = case med of
|
||||
Just (EmptyDirectory d) -> Just d
|
||||
Just (EmptyDirectory d) -> Just (fromOsPath d)
|
||||
Nothing -> Nothing
|
||||
}
|
||||
copyright =<< bracket (setup p) cleanup (go p)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue