Copy and paste a file in same directory erases original file

What is the problem you are having with rclone?

When copying and pasting a file in the same directory, the original file is completely erased.
The new copy file is also empty.
If copying a file and pasting it to a different directory all is good. In this case the original file name is: 'Phase2_Spec 2.xlsx' and the copied one is: 'Phase2_Spec 2 - Copy.xlsx'
Original size 16KB, then is 0KB on both.

What is your rclone version (output from rclone version)

rclone v1.54.1
windows - amd64

  • go version: go1.15.8

Which OS you are using and how many bits (eg Windows 7, 64 bit)

Windows 10, 64-bit

Which cloud storage system are you using? (eg Google Drive)

Google Drive - Team

The command you were trying to run

This is through the Windows GUI.  Copy and Paste.

The rclone config contents with secrets removed.

[IT]
type = drive
scope = drive
token = {"access_token":"XXXXXXXXXX","token_type":"Bearer","refresh_token":"XXXXXX","expiry":"XXXX"}
team_drive = XXXXXXXX
root_folder_id =

A log from the command with the -vv flag

https://pastebin.com/SKZFdq8i

It kept saying I can only use 2 links in a post, so I had to split the whole thing. Not sure how links are defined but I could only see one, the log file.

Thank you.

hello and welcome to the forum,

can you try replicate the problem, without using rclone mount.
try testing with rclone copy

also, can you test the rclone mount without --vfs-cache-mode

Hi

Thank you for your reply.

  1. As far as I understand rclone copy, does't let you copy a single file.

rclone copy source:path dest:path
'path' needs to be a directory, right?

This creates a new directory with the same file inside. Not what I want:
rclone copy IT:POS/Phase2_Spec-2.xlsx IT:POS/Phase2_Spec-2-TEST.xlsx

This doesn't do anything at all:
rclone copy IT:POS/Phase2_Spec-2.xlsx IT:POS

  1. Without --vfs-cache-mode full
    Apart that it's extremely slow to do anything, but yes, same thing, original file 0KB and new copied file 0KB

Let me explain further. The purpose of this exercise is to use rclone on a terminal server, so all users can simultaneously access the drive. Google Drive FS is a mess on a terminal server, it can't work.
I would like to use rclone mount to do that. But not if I can't copy and paste a file securely.

Thank you!

  1. rclone can copy a single file
rclone.exe copy C:\data\rclone\scripts\test\singlefiletest\asinglefile.txt wasabi01:singlefiletest -vv 
DEBUG : rclone: Version "v1.54.1" starting with parameters ["c:\\data\\rclone\\scripts\\rclone.exe" "copy" "C:\\data\\rclone\\scripts\\test\\singlefiletest\\asinglefile.txt" "wasabi01:singlefiletest" "-vv"]
DEBUG : Creating backend with remote "C:\\data\\rclone\\scripts\\test\\singlefiletest\\asinglefile.txt"
DEBUG : Using config file from "c:\\data\\rclone\\scripts\\rclone.conf"
DEBUG : fs cache: adding new entry for parent of "C:\\data\\rclone\\scripts\\test\\singlefiletest\\asinglefile.txt", "//?/C:/data/rclone/scripts/test/singlefiletest"
DEBUG : Creating backend with remote "wasabi01:singlefiletest"
DEBUG : asinglefile.txt: Need to transfer - File not found at Destination
INFO  : S3 bucket singlefiletest: Bucket "singlefiletest" created with ACL "private"
DEBUG : asinglefile.txt: MD5 = 594ed36754a38f1e049efe867f4b9553 OK
INFO  : asinglefile.txt: Copied (new)
INFO  : 
Transferred:   	         4 / 4 Bytes, 100%, 45 Bytes/s, ETA 0s
Transferred:            1 / 1, 100%
Elapsed time:         0.2s

rclone.exe ls wasabi01:singlefiletest 
        4 asinglefile.txt
  1. you call this a suspected bug, the main way to test is to simply the command as much as possbile, see what happens.

as a test, using a mount, i was able to copy and paste a file in the same folder no problem

Thank your for your help and reply.

  1. Sorry, perhaps I didn't explain very well what I am trying to do.
    I would like to duplicate a file within the same drive. Not from Windows to the drive or vice-versa. Dirve to drive. Same function as on the web interface 'Make a copy'

  2. Since I would like to use rclone mount for all users, and end users often use copy / paste, is there a solution to this, will it be fixed?

Thank you

in the same drive, or in the same folder?
in either case, i am able to do that, see my last post.

I see the image you shared. So, is there something wrong in my mount command?

rclone mount IT: Z: --network-mode --vfs-cache-mode full --log-file="C:\Users\Max Serafini\Documents\rclone.log" --log-level DEBUG --cache-dir "C:\Users\Max Serafini\Documents\Cache"

Either way, bug or mount error, it should be clear from the log file. Where is the issue?

First copy, notice the size:
image

as a test, i used this command, trying to mimic your command.
rclone.exe mount wasabi01: b:\mount\rclone\wasabi01 --network-mode --vfs-cache-mode=full --cache-dir=C:\ex\cache --log-file=C:\data\rclone\scripts\rr\other\mount\log.mount.wasabi01.txt --log-level=DEBUG

i was able to copy and paste an existing file in a folder in mount to the same folder on the same mount.
no problem.

Then paste, size 0KB:
image

Thank you for all your help. I've got to go into a meeting. I will test later.

i was able to replicate the problem with this command
rclone.exe mount wasabi01: b:\mount\rclone\wasabi01

it seems to happen with windows explorer, which i have not used on a daily basis on over 10+ years.
tho it does not happen with double commander, a open source clone of total commander.

i tried the lastest winfsp beta, still the problem persists.

@ncw, take you take a look at the OP log file.
i hate to call anything about rclone a bug, perhaps an anomalous issue.

1 Like

Can you replicate that with --vfs-cache-mode full too?

Could one of you do me a minimal log, so replicate the problem once with a small file? And I'll have a dig through it.

Thanks

here is a minimal log, start rclone, goto the folder in the mount and use windows explorer to do a copy and paste.
as for --vfs-cache-mode full, i will test now...

2021/03/29 14:48:18 DEBUG : rclone: Version "v1.54.1" starting with parameters [ - Pastebin.com

as for --vfs-cache-mode full, same as without the flag.

  • windows explorer - the problem happens
  • double commander, a dual-pane file manager - the problem does not happen.

How big was /singlefiletest/test.xlsx before you started? Was it > 0 bytes? If not can you repeat the test so that it has got something in to start with?