putio: use lib/encoder

And in the process
- fix a bug with + and & in file name
- fix NewObject returning directories as files
This commit is contained in:
Nick Craig-Wood
2019-10-02 11:34:08 +01:00
parent 4615343b73
commit fd51f24906
6 changed files with 54 additions and 9 deletions
+10
View File
@@ -238,6 +238,16 @@ const Pcloud = encoder.MultiEncoder(
encoder.EncodeBackSlash |
encoder.EncodeInvalidUtf8)
// Putio is the encoding used by the putio backend
//
// Note that \ is renamed to -
//
// Encode invalid UTF-8 bytes as json doesn't handle them properly.
const Putio = encoder.MultiEncoder(
uint(Display) |
encoder.EncodeBackSlash |
encoder.EncodeInvalidUtf8)
// Fichier is the encoding used by the fichier backend
//
// Characters that need escaping