"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
crypt: use an in place filter for encrypting directory entries
Nick Craig-Woode069fc439e62
diff --git a/crypt/crypt.go b/crypt/crypt.goindex 4f32ff4c5..571a857bf 100644--- a/crypt/crypt.go+++ b/crypt/crypt.go@@ -170,9 +170,9 @@ func (f *Fs) addDir(entries *fs.DirEntries, dir *fs.Dir) {*entries = append(*entries, f.newDir(dir))}-// Encrypt some directory entries+// Encrypt some directory entries. This alters entries returning it as newEntries.func (f *Fs) encryptEntries(entries fs.DirEntries) (newEntries fs.DirEntries, err error) {- newEntries = make(fs.DirEntries, 0, len(entries))+ newEntries = entries[:0] // in place filterfor _, entry := range entries {switch x := entry.(type) {case fs.Object: