"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
cmount: fix error handling for Open/OpenDir
Nick Craig-Wood4f6f07c07463
diff --git a/cmd/cmount/fs.go b/cmd/cmount/fs.goindex b993a222b..1b21ca7b5 100644--- a/cmd/cmount/fs.go+++ b/cmd/cmount/fs.go@@ -204,7 +204,7 @@ func (fsys *FS) Getattr(path string, stat *fuse.Stat_t, fh uint64) (errc int) {func (fsys *FS) Opendir(path string) (errc int, fh uint64) {defer log.Trace(path, "")("errc=%d, fh=0x%X", &errc, &fh)handle, err := fsys.VFS.OpenFile(path, os.O_RDONLY, 0777)- if errc != 0 {+ if err != nil {return translateError(err), fhUnset}return 0, fsys.openHandle(handle)@@ -285,7 +285,7 @@ func (fsys *FS) Open(path string, flags int) (errc int, fh uint64) {// translate the fuse flags to os flagsflags = translateOpenFlags(flags)handle, err := fsys.VFS.OpenFile(path, flags, 0777)- if errc != 0 {+ if err != nil {return translateError(err), fhUnset}