mirror of
https://github.com/rclone/rclone.git
synced 2025-01-11 00:40:03 +01:00
dropbox: fix Unable to decrypt returned paths from changeNotify - fixes #5165
This was caused by incorrect use of strings.TrimLeft where strings.TrimPrefix was required.
This commit is contained in:
parent
4a9469a3dc
commit
5d85e6bc9c
@ -1353,13 +1353,13 @@ func (f *Fs) changeNotifyRunner(ctx context.Context, notifyFunc func(string, fs.
|
|||||||
switch info := entry.(type) {
|
switch info := entry.(type) {
|
||||||
case *files.FolderMetadata:
|
case *files.FolderMetadata:
|
||||||
entryType = fs.EntryDirectory
|
entryType = fs.EntryDirectory
|
||||||
entryPath = strings.TrimLeft(info.PathDisplay, f.slashRootSlash)
|
entryPath = strings.TrimPrefix(info.PathDisplay, f.slashRootSlash)
|
||||||
case *files.FileMetadata:
|
case *files.FileMetadata:
|
||||||
entryType = fs.EntryObject
|
entryType = fs.EntryObject
|
||||||
entryPath = strings.TrimLeft(info.PathDisplay, f.slashRootSlash)
|
entryPath = strings.TrimPrefix(info.PathDisplay, f.slashRootSlash)
|
||||||
case *files.DeletedMetadata:
|
case *files.DeletedMetadata:
|
||||||
entryType = fs.EntryObject
|
entryType = fs.EntryObject
|
||||||
entryPath = strings.TrimLeft(info.PathDisplay, f.slashRootSlash)
|
entryPath = strings.TrimPrefix(info.PathDisplay, f.slashRootSlash)
|
||||||
default:
|
default:
|
||||||
fs.Errorf(entry, "dropbox ChangeNotify: ignoring unknown EntryType %T", entry)
|
fs.Errorf(entry, "dropbox ChangeNotify: ignoring unknown EntryType %T", entry)
|
||||||
continue
|
continue
|
||||||
|
Loading…
Reference in New Issue
Block a user