encodings: add . and .. to all backends, except Drive
This commit is contained in:
parent
d5cd026547
commit
c8d3e57418
2 changed files with 11 additions and 2 deletions
|
@ -189,6 +189,14 @@ which will be specified in the documentation for each backend.
|
|||
| / | 0x2F | / |
|
||||
| DEL | 0x7F | ␡ |
|
||||
|
||||
The default encoding will also encode these file names as they are
|
||||
problematic with many cloud storage systems.
|
||||
|
||||
| File name | Replacement |
|
||||
| --------- |:-----------:|
|
||||
| . | . |
|
||||
| .. | .. |
|
||||
|
||||
#### Invalid UTF-8 bytes {#invalid-utf8}
|
||||
|
||||
Some backends only support a sequence of well formed UTF-8 bytes
|
||||
|
|
|
@ -12,7 +12,8 @@ import (
|
|||
// Base only encodes the zero byte and slash
|
||||
const Base = encoder.MultiEncoder(
|
||||
encoder.EncodeZero |
|
||||
encoder.EncodeSlash)
|
||||
encoder.EncodeSlash |
|
||||
encoder.EncodeDot)
|
||||
|
||||
// Display is the internal encoding for logging and output
|
||||
const Display = encoder.Standard
|
||||
|
@ -83,7 +84,7 @@ const Box = encoder.MultiEncoder(
|
|||
|
||||
// Drive is the encoding used by the drive backend
|
||||
//
|
||||
// Encode invalid UTF-8 bytes as json doesn't handle them.
|
||||
// Encode invalid UTF-8 bytes as json doesn't handle them properly.
|
||||
// Don't encode / as it's a valid name character in drive.
|
||||
const Drive = encoder.MultiEncoder(
|
||||
encoder.EncodeInvalidUtf8)
|
||||
|
|
Loading…
Reference in a new issue