Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

Fix output of crypt objects in logs

Nick Craig-Woodde73063977e5
diff --git a/cmd/mount/createinfo.go b/cmd/mount/createinfo.go
index babc0c259..ea5ad9e73 100644
--- a/cmd/mount/createinfo.go
+++ b/cmd/mount/createinfo.go
@@ -26,6 +26,11 @@ func (ci *createInfo) Fs() fs.Info {
return ci.f
}
+// String returns the remote path
+func (ci *createInfo) String() string {
+ return ci.remote
+}
+
// Remote returns the remote path
func (ci *createInfo) Remote() string {
return ci.remote
diff --git a/fs/fs.go b/fs/fs.go
index 48840b90c..ea7d00340 100644
--- a/fs/fs.go
+++ b/fs/fs.go
@@ -165,9 +165,6 @@ type Info interface {
type Object interface {
ObjectInfo
- // String returns a description of the Object
- String() string
-
// SetModTime sets the metadata on the object to set the modification date
SetModTime(time.Time) error
@@ -199,6 +196,9 @@ type ObjectInfo interface {
// BasicInfo common interface for Dir and Object providing the very
// basic attributes of an object.
type BasicInfo interface {
+ // String returns a description of the Object
+ String() string
+
// Remote returns the remote path
Remote() string
@@ -357,6 +357,11 @@ type Dir struct {
Count int64 // number of objects -1 for unknown
}
+// String returns the name
+func (d *Dir) String() string {
+ return d.Name
+}
+
// Remote returns the remote path
func (d *Dir) Remote() string {
return d.Name
@@ -523,6 +528,7 @@ type staticObjectInfo struct {
func (i *staticObjectInfo) Fs() Info { return i.fs }
func (i *staticObjectInfo) Remote() string { return i.remote }
+func (i *staticObjectInfo) String() string { return i.remote }
func (i *staticObjectInfo) ModTime() time.Time { return i.modTime }
func (i *staticObjectInfo) Size() int64 { return i.size }
func (i *staticObjectInfo) Storable() bool { return i.storable }