diff --git a/backend/cache/cache.go b/backend/cache/cache.go index 18b5e2122..fc038f6ad 100644 --- a/backend/cache/cache.go +++ b/backend/cache/cache.go @@ -1747,7 +1747,7 @@ func (f *Fs) CleanUp(ctx context.Context) error { func (f *Fs) About(ctx context.Context) (*fs.Usage, error) { do := f.Fs.Features().About if do == nil { - return nil, errors.New("About not supported") + return nil, errors.New("not supported by underlying remote") } return do(ctx) } diff --git a/backend/chunker/chunker.go b/backend/chunker/chunker.go index 76bed2e6c..5165a582b 100644 --- a/backend/chunker/chunker.go +++ b/backend/chunker/chunker.go @@ -1895,7 +1895,7 @@ func (f *Fs) DirMove(ctx context.Context, src fs.Fs, srcRemote, dstRemote string func (f *Fs) CleanUp(ctx context.Context) error { do := f.base.Features().CleanUp if do == nil { - return errors.New("can't CleanUp") + return errors.New("not supported by underlying remote") } return do(ctx) } @@ -1904,7 +1904,7 @@ func (f *Fs) CleanUp(ctx context.Context) error { func (f *Fs) About(ctx context.Context) (*fs.Usage, error) { do := f.base.Features().About if do == nil { - return nil, errors.New("About not supported") + return nil, errors.New("not supported by underlying remote") } return do(ctx) } diff --git a/backend/compress/compress.go b/backend/compress/compress.go index db90dca25..9656fb573 100644 --- a/backend/compress/compress.go +++ b/backend/compress/compress.go @@ -906,7 +906,7 @@ func (f *Fs) DirMove(ctx context.Context, src fs.Fs, srcRemote, dstRemote string func (f *Fs) CleanUp(ctx context.Context) error { do := f.Fs.Features().CleanUp if do == nil { - return errors.New("can't CleanUp: not supported by underlying remote") + return errors.New("not supported by underlying remote") } return do(ctx) } @@ -915,7 +915,7 @@ func (f *Fs) CleanUp(ctx context.Context) error { func (f *Fs) About(ctx context.Context) (*fs.Usage, error) { do := f.Fs.Features().About if do == nil { - return nil, errors.New("can't About: not supported by underlying remote") + return nil, errors.New("not supported by underlying remote") } return do(ctx) } diff --git a/backend/crypt/crypt.go b/backend/crypt/crypt.go index a28114293..11dd55dad 100644 --- a/backend/crypt/crypt.go +++ b/backend/crypt/crypt.go @@ -597,7 +597,7 @@ func (f *Fs) PutUnchecked(ctx context.Context, in io.Reader, src fs.ObjectInfo, func (f *Fs) CleanUp(ctx context.Context) error { do := f.Fs.Features().CleanUp if do == nil { - return errors.New("can't CleanUp") + return errors.New("not supported by underlying remote") } return do(ctx) } @@ -606,7 +606,7 @@ func (f *Fs) CleanUp(ctx context.Context) error { func (f *Fs) About(ctx context.Context) (*fs.Usage, error) { do := f.Fs.Features().About if do == nil { - return nil, errors.New("About not supported") + return nil, errors.New("not supported by underlying remote") } return do(ctx) } diff --git a/backend/dropbox/dropbox.go b/backend/dropbox/dropbox.go index 68abe619c..446f475f8 100644 --- a/backend/dropbox/dropbox.go +++ b/backend/dropbox/dropbox.go @@ -1269,7 +1269,7 @@ func (f *Fs) About(ctx context.Context) (usage *fs.Usage, err error) { return shouldRetry(ctx, err) }) if err != nil { - return nil, fmt.Errorf("about failed: %w", err) + return nil, err } var total uint64 if q.Allocation != nil { diff --git a/backend/hasher/hasher.go b/backend/hasher/hasher.go index 44b403f36..1870983e0 100644 --- a/backend/hasher/hasher.go +++ b/backend/hasher/hasher.go @@ -282,7 +282,7 @@ func (f *Fs) CleanUp(ctx context.Context) error { if do := f.Fs.Features().CleanUp; do != nil { return do(ctx) } - return errors.New("CleanUp not supported") + return errors.New("not supported by underlying remote") } // About gets quota information from the Fs @@ -290,7 +290,7 @@ func (f *Fs) About(ctx context.Context) (*fs.Usage, error) { if do := f.Fs.Features().About; do != nil { return do(ctx) } - return nil, errors.New("About not supported") + return nil, errors.New("not supported by underlying remote") } // ChangeNotify calls the passed function with a path that has had changes. diff --git a/backend/onedrive/onedrive.go b/backend/onedrive/onedrive.go index 3fc06b54b..630a51197 100644 --- a/backend/onedrive/onedrive.go +++ b/backend/onedrive/onedrive.go @@ -1502,7 +1502,7 @@ func (f *Fs) About(ctx context.Context) (usage *fs.Usage, err error) { return shouldRetry(ctx, resp, err) }) if err != nil { - return nil, fmt.Errorf("about failed: %w", err) + return nil, err } q := drive.Quota // On (some?) Onedrive sharepoints these are all 0 so return unknown in that case diff --git a/backend/pcloud/pcloud.go b/backend/pcloud/pcloud.go index beab72b0e..82f9f42f5 100644 --- a/backend/pcloud/pcloud.go +++ b/backend/pcloud/pcloud.go @@ -906,7 +906,7 @@ func (f *Fs) About(ctx context.Context) (usage *fs.Usage, err error) { return shouldRetry(ctx, resp, err) }) if err != nil { - return nil, fmt.Errorf("about failed: %w", err) + return nil, err } usage = &fs.Usage{ Total: fs.NewUsageValue(q.Quota), // quota of bytes that can be used diff --git a/backend/premiumizeme/premiumizeme.go b/backend/premiumizeme/premiumizeme.go index 58e2898e1..3b02a3ac3 100644 --- a/backend/premiumizeme/premiumizeme.go +++ b/backend/premiumizeme/premiumizeme.go @@ -783,10 +783,10 @@ func (f *Fs) About(ctx context.Context) (usage *fs.Usage, err error) { return shouldRetry(ctx, resp, err) }) if err != nil { - return nil, fmt.Errorf("CreateDir http: %w", err) + return nil, err } if err = info.AsErr(); err != nil { - return nil, fmt.Errorf("CreateDir: %w", err) + return nil, err } usage = &fs.Usage{ Used: fs.NewUsageValue(int64(info.SpaceUsed)), diff --git a/backend/putio/fs.go b/backend/putio/fs.go index 29cc2f840..3e2855b7d 100644 --- a/backend/putio/fs.go +++ b/backend/putio/fs.go @@ -647,7 +647,7 @@ func (f *Fs) About(ctx context.Context) (usage *fs.Usage, err error) { return shouldRetry(ctx, err) }) if err != nil { - return nil, fmt.Errorf("about failed: %w", err) + return nil, err } return &fs.Usage{ Total: fs.NewUsageValue(ai.Disk.Size), // quota of bytes that can be used diff --git a/backend/sftp/sftp.go b/backend/sftp/sftp.go index 35e21ac2d..dbb87f4e7 100644 --- a/backend/sftp/sftp.go +++ b/backend/sftp/sftp.go @@ -1220,7 +1220,7 @@ func (f *Fs) About(ctx context.Context) (*fs.Usage, error) { } stdout, err := f.run(ctx, "df -k "+escapedPath) if err != nil { - return nil, fmt.Errorf("your remote may not support About: %w", err) + return nil, fmt.Errorf("your remote may not have the required df utility: %w", err) } usageTotal, usageUsed, usageAvail := parseUsage(stdout) diff --git a/backend/webdav/webdav.go b/backend/webdav/webdav.go index 77fcf93d1..64c3e983a 100644 --- a/backend/webdav/webdav.go +++ b/backend/webdav/webdav.go @@ -1161,7 +1161,7 @@ func (f *Fs) About(ctx context.Context) (*fs.Usage, error) { return f.shouldRetry(ctx, resp, err) }) if err != nil { - return nil, fmt.Errorf("about call failed: %w", err) + return nil, err } usage := &fs.Usage{} if i, err := strconv.ParseInt(q.Used, 10, 64); err == nil && i >= 0 { diff --git a/cmd/about/about.go b/cmd/about/about.go index fd59db672..46c1d6f66 100644 --- a/cmd/about/about.go +++ b/cmd/about/about.go @@ -102,7 +102,7 @@ see complete list in [documentation](https://rclone.org/overview/#optional-featu } u, err := doAbout(context.Background()) if err != nil { - return fmt.Errorf("About call failed: %w", err) + return fmt.Errorf("about call failed: %w", err) } if u == nil { return errors.New("nil usage returned")