crypt: fix purge bug introduced by refactor #1891

In this commit

a2afa9aadd fs: Add directory to optional Purge interface

We failed to encrypt the directory name so the Purge failed.

This was spotted by the integration tests.
This commit is contained in:
Nick Craig-Wood 2020-09-01 15:16:14 +01:00
parent 7dcbebf9bc
commit 3f0d54daae

View File

@ -438,7 +438,7 @@ func (f *Fs) Purge(ctx context.Context, dir string) error {
if do == nil {
return fs.ErrorCantPurge
}
return do(ctx, dir)
return do(ctx, f.cipher.EncryptDirName(dir))
}
// Copy src to this remote using server side copy operations.