mirror of
https://github.com/rclone/rclone.git
synced 2024-11-22 09:11:11 +08:00
crypt: fix for unencrypted directory names on case insensitive remotes
rclone sync erroneously deleted folders renamed to a different case on crypts where directory name encryption was disabled and the underlying remote was case insensitive. Example: Renaming the folder Test to tEST before a sync to a crypt having remote=OneDrive:crypt and directory_name_encryption=false could result in the folder and all its content being deleted. The following sync would correctly create the tEST folder and upload all of the content. Additional tests have revealed other potential issues when using filename_encryption=off or directory_name_encryption=false on case insensitive remotes. The documentation has been updated to warn about potential problems when using these combinations.
This commit is contained in:
parent
1cafc12e8c
commit
02d6d28ec4
|
@ -235,7 +235,7 @@ func NewFs(ctx context.Context, name, rpath string, m configmap.Mapper) (fs.Fs,
|
|||
// the features here are ones we could support, and they are
|
||||
// ANDed with the ones from wrappedFs
|
||||
f.features = (&fs.Features{
|
||||
CaseInsensitive: cipher.NameEncryptionMode() == NameEncryptionOff,
|
||||
CaseInsensitive: !cipher.dirNameEncrypt || cipher.NameEncryptionMode() == NameEncryptionOff,
|
||||
DuplicateFiles: true,
|
||||
ReadMimeType: false, // MimeTypes not supported with crypt
|
||||
WriteMimeType: false,
|
||||
|
|
|
@ -455,6 +455,7 @@ Properties:
|
|||
- "off"
|
||||
- Don't encrypt the file names.
|
||||
- Adds a ".bin" extension only.
|
||||
- May cause problems on [case insensitive](/overview/#case-insensitive) [storage systems](/overview/#features) like OneDrive, Dropbox, Windows, OSX and SMB.
|
||||
|
||||
#### --crypt-directory-name-encryption
|
||||
|
||||
|
@ -473,6 +474,7 @@ Properties:
|
|||
- Encrypt directory names.
|
||||
- "false"
|
||||
- Don't encrypt directory names, leave them intact.
|
||||
- May cause problems on [case insensitive](/overview/#case-insensitive) [storage systems](/overview/#features) like OneDrive, Dropbox, Windows, OSX and SMB.
|
||||
|
||||
#### --crypt-password
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user