"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
cache: fix nil pointer deref when using lsjson on cached directory
Nick Craig-Woodffd11662babc
diff --git a/backend/cache/directory.go b/backend/cache/directory.goindex 658dbda72..863612758 100644--- a/backend/cache/directory.go+++ b/backend/cache/directory.go@@ -12,7 +12,7 @@ import (// Directory is a generic dir that stores basic information about ittype Directory struct {- fs.Directory `json:"-"`+ Directory fs.Directory `json:"-"` // can be nilCacheFs *Fs `json:"-"` // cache fsName string `json:"name"` // name of the directory@@ -125,6 +125,14 @@ func (d *Directory) Items() int64 {return d.CacheItems}+// ID returns the ID of the cached directory if known+func (d *Directory) ID() string {+ if d.Directory == nil {+ return ""+ }+ return d.Directory.ID()+}+var (_ fs.Directory = (*Directory)(nil))