mirror of
https://github.com/rclone/rclone.git
synced 2025-06-20 19:57:51 +02:00
Drive: disable copy and move for google docs - fixes #332
This commit is contained in:
parent
e6f340d245
commit
b279df2e67
@ -695,6 +695,9 @@ func (f *Fs) Copy(src fs.Object, remote string) (fs.Object, error) {
|
|||||||
fs.Debug(src, "Can't copy - not same remote type")
|
fs.Debug(src, "Can't copy - not same remote type")
|
||||||
return nil, fs.ErrorCantCopy
|
return nil, fs.ErrorCantCopy
|
||||||
}
|
}
|
||||||
|
if srcObj.isDocument {
|
||||||
|
return nil, fmt.Errorf("Can't copy a Google document")
|
||||||
|
}
|
||||||
|
|
||||||
o, createInfo, err := f.createFileInfo(remote, srcObj.ModTime(), srcObj.bytes)
|
o, createInfo, err := f.createFileInfo(remote, srcObj.ModTime(), srcObj.bytes)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -757,6 +760,9 @@ func (f *Fs) Move(src fs.Object, remote string) (fs.Object, error) {
|
|||||||
fs.Debug(src, "Can't move - not same remote type")
|
fs.Debug(src, "Can't move - not same remote type")
|
||||||
return nil, fs.ErrorCantMove
|
return nil, fs.ErrorCantMove
|
||||||
}
|
}
|
||||||
|
if srcObj.isDocument {
|
||||||
|
return nil, fmt.Errorf("Can't move a Google document")
|
||||||
|
}
|
||||||
|
|
||||||
// Temporary FsObject under construction
|
// Temporary FsObject under construction
|
||||||
dstObj, dstInfo, err := f.createFileInfo(remote, srcObj.ModTime(), srcObj.bytes)
|
dstObj, dstInfo, err := f.createFileInfo(remote, srcObj.ModTime(), srcObj.bytes)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user