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
+14
View File
@@ -8,11 +8,25 @@ import (
"github.com/rclone/rclone/fs"
"github.com/rclone/rclone/fs/config/configmap"
"github.com/rclone/rclone/fs/config/obscure"
"github.com/rclone/rclone/fs/encodings"
"github.com/rclone/rclone/lib/dircache"
"github.com/rclone/rclone/lib/oauthutil"
"golang.org/x/oauth2"
)
/*
// TestPutio
stringNeedsEscaping = []rune{
'/', '\x00'
}
maxFileLength = 255
canWriteUnnormalized = true
canReadUnnormalized = true
canReadRenormalized = true
canStream = false
*/
const enc = encodings.Putio
// Constants
const (
rcloneClientID = "4131"