more OsPath conversion
Sponsored-by: Luke T. Shumaker
This commit is contained in:
parent
7da6f83582
commit
0376bc5ee0
7 changed files with 130 additions and 134 deletions
|
@ -153,10 +153,10 @@ instance Proto.Serializable TransferAssociatedFile where
|
|||
-- Comes last, so whitespace is ok. But, in case the filename
|
||||
-- contains eg a newline, escape it. Use C-style encoding.
|
||||
serialize (TransferAssociatedFile (AssociatedFile (Just f))) =
|
||||
decodeBS (encode_c isUtf8Byte f)
|
||||
fromRawFilePath (encode_c isUtf8Byte (fromOsPath f))
|
||||
serialize (TransferAssociatedFile (AssociatedFile Nothing)) = ""
|
||||
|
||||
deserialize "" = Just $ TransferAssociatedFile $
|
||||
AssociatedFile Nothing
|
||||
deserialize s = Just $ TransferAssociatedFile $
|
||||
AssociatedFile $ Just $ decode_c $ encodeBS s
|
||||
AssociatedFile $ Just $ toOsPath $ decode_c $ toRawFilePath s
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue