From 28925414b8185af4e1acb61d8341c9e22fecac22 Mon Sep 17 00:00:00 2001
From: Nick Craig-Wood <nick@craig-wood.com>
Date: Sun, 17 Jul 2022 12:47:40 +0100
Subject: [PATCH] dropox: fix ChangeNotify was unable to decrypt errors

Before this fix, the dropbox backend wasn't decoding the file names
received in changenotify events into rclone standard format.

This meant that changenotify events for filenames which had encoded
characters were failing to be decrypted properly if wrapped in crypt.

See: https://forum.rclone.org/t/rclone-vfs-cache-says-file-name-too-long/31535
---
 backend/dropbox/dropbox.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/backend/dropbox/dropbox.go b/backend/dropbox/dropbox.go
index 100044862..ca026e8c9 100644
--- a/backend/dropbox/dropbox.go
+++ b/backend/dropbox/dropbox.go
@@ -1435,7 +1435,7 @@ func (f *Fs) changeNotifyRunner(ctx context.Context, notifyFunc func(string, fs.
 			}
 
 			if entryPath != "" {
-				notifyFunc(entryPath, entryType)
+				notifyFunc(f.opt.Enc.ToStandardPath(entryPath), entryType)
 			}
 		}
 		if !changeList.HasMore {