Move/moveto on Google Drive causes folder linking


#1

I run: rclone move drive:srcDir drive:Folder/srcDir or rclone moveto drive:srcDir drive:Folder/srcDir and it creates a “link” between the two folders. The original directory is not deleted (I’ve tried running it with --delete-after but nothing gets deleted), and if I try to rename the original or new directory from Google Drive, they both get renamed. On the Google Drive website it shows that the folder I moved is now in two locations (picture below). When I run the command on a file, it just gets moved, without any linking, and the source gets deleted.

Screenshot from 2018-04-12 21-17-00


#2

I replicated this quite easily!

Can you please make a new issue on github - thanks.

$ rclone mkdir drive:test/move/srcDir
$ rclone mkdir drive:test/move/Folder
$ rclone lsf -R drive:test/move
Folder/
srcDir/
$ rclone -vv move drive:test/move/srcDir drive:test/move/Folder/srcDir
2018/04/13 11:31:42 DEBUG : rclone: Version "v1.40-074-g9012d78c-mega" starting with parameters ["rclone" "-vv" "move" "drive:test/move/srcDir" "drive:test/move/Folder/srcDir"]
2018/04/13 11:31:42 DEBUG : Using config file from "/home/ncw/.rclone.conf"
2018/04/13 11:31:47 INFO  : Google drive root 'test/move/Folder/srcDir': Modify window is 1ms
2018/04/13 11:31:47 DEBUG : Google drive root 'test/move/Folder/srcDir': Using server side directory move
2018/04/13 11:31:48 INFO  : Google drive root 'test/move/Folder/srcDir': Server side directory move succeeded
2018/04/13 11:31:48 INFO  : 
Transferred:      0 Bytes (0 Bytes/s)
Errors:                 0
Checks:                 0
Transferred:            0
Elapsed time:        5.3s

2018/04/13 11:31:48 DEBUG : 5 go routines active
2018/04/13 11:31:48 DEBUG : rclone: Version "v1.40-074-g9012d78c-mega" finishing with parameters ["rclone" "-vv" "move" "drive:test/move/srcDir" "drive:test/move/Folder/srcDir"]
$ rclone lsf -R drive:test/move
Folder/
srcDir/
Folder/srcDir/

#3

I ran into this same bug when trying to move gdrive:Dir1/SubDir1 -> gdrive:Dir2/SubDir1. The only solution was to sync SubDir1 locally and re-upload it to gdrive:Dir2.

I think there is related bug:
rclone moveto gdrive:Dir1/file1 gdrive:Dir1/file2 results in a server-side move (not a link)
However,
rclone moveto gdrive:Dir1/file1 gdrive:Dir1/file1 deletes file1 entirely.
The expected behavior is that file1 isn’t touched.


#4

btw I know it is insane and makes no sense, but the issue discussed in this thread is likely related to and the cause of my problems in this thread: https://forum.rclone.org/t/how-do-i-move-files-from-the-root-of-a-google-drive-into-a-subdirectory

google’s handling of serverside move commands is likely similar to what google does when you use the GD website to tell it to do something, which, results in some nonsense.

I think rclone move needs a flag that disables server side move’s even if the server offers them. That would at least make it easier for user to avoid shooting themselves in the foot. This also relates to a thread I made about a month ago. which I won’t link because it’s so old.


#5

It is a bug from the v3 API conversion which I’m working on a fix for. I’ll post a beta here when I’m done: https://github.com/ncw/rclone/issues/2245