forked from TrueCloudLab/rclone
cache: add extra logging in Move and Copy
This commit is contained in:
parent
cbe5d7ce64
commit
2497ca5134
1 changed files with 2 additions and 0 deletions
2
cache/cache.go
vendored
2
cache/cache.go
vendored
|
@ -731,6 +731,7 @@ func (f *Fs) PutUnchecked(in io.Reader, src fs.ObjectInfo, options ...fs.OpenOpt
|
||||||
func (f *Fs) Copy(src fs.Object, remote string) (fs.Object, error) {
|
func (f *Fs) Copy(src fs.Object, remote string) (fs.Object, error) {
|
||||||
do := f.Fs.Features().Copy
|
do := f.Fs.Features().Copy
|
||||||
if do == nil {
|
if do == nil {
|
||||||
|
fs.Errorf(src, "source remote (%v) doesn't support Copy", src.Fs())
|
||||||
return nil, fs.ErrorCantCopy
|
return nil, fs.ErrorCantCopy
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -770,6 +771,7 @@ func (f *Fs) Copy(src fs.Object, remote string) (fs.Object, error) {
|
||||||
func (f *Fs) Move(src fs.Object, remote string) (fs.Object, error) {
|
func (f *Fs) Move(src fs.Object, remote string) (fs.Object, error) {
|
||||||
do := f.Fs.Features().Move
|
do := f.Fs.Features().Move
|
||||||
if do == nil {
|
if do == nil {
|
||||||
|
fs.Errorf(src, "source remote (%v) doesn't support Move", src.Fs())
|
||||||
return nil, fs.ErrorCantMove
|
return nil, fs.ErrorCantMove
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue