Copy and paste a file in same directory erases original file

before the copy and paste, /singlefiletest/test.xlsx was greater then zero bytes.
after the copy and paste, /singlefiletest/test.xlsx and Copy (1) test.xlsx are zero bytes.
if i kill the mount, restart the mount, both files are still zero bytes and excel is not able to open either file.

at first, i tested with a simple .txt file, non-zero in size, same behavior.
tho if i open the two texts files in notepadd++, both files open and are empty of contents.

since the OP was using a excel spreadsheet, i also tested with that.

Thanks for all your testing and help guys.

I posted an xlsx file, but sure enough it happens with any and all files.

Definitely limited to Windows File Explorer. Linux GNOME is ok.

This problem stems from the way the Windows Explorer works with file system. I don't know details but the way must be rather dumb.

If you install TeraCopy (great stuff btw) and configure it to handle file copy/pasting by default, the problem goes away. TeraCopy internally starts from creating a temporary random-named file and renames it to the final name at the end after success.

I noticed this in 2019 but had no time to dig deeper. You'll want to copy/paste a file inside the same folder and look very thouroughly at the VFS log to understand the quirk. I guess that the solution might lead to a new VFS mode that buffers full file during writes. At any rate, this quirk deserves a paragraph in rclone docs!

The issue #2187 mentioned a similar Windows Explorer quirk: when it creates a new folder, it makes 4 retries if it doesn't like something in a result returned by the file system.

hi,
thanks for looking into this.

teracopy is good, but not closed source and has the free edition and paid edition.
so i use fastcopy.

also, using double commander, dual pane file manager, these ms-windows bugs do not happen.

i know you are super busy behind the scenes but...
these two issues prevent a huge amount of windows users from being able to use rclone mount, not being able to perform basic operation, copy and paste.

Could you submit a bug request and assign on me?

Its the same case as this newly reported issue, isn't it?

1 Like

sure, but i think that has been done.
thanks

Thanks for making the issue.

Yes a detailed analysis of the log will be needed.

This is quite time consuming unfortunately!

I expect explorer is doing something unexpected - we'll be able to fix it eventually I'm sure!

1 Like

Thank you guys, I am sure you will fix it.

How will you communicate it once it's done? Through this same forum topic or some other ways?

If you have github account you can subscribe on the issue and get notifications whenever something happens..

-Great-
Cheers!

v1.55.0 fix the problem.

tested with and without --vfs-cache-mode full

thanks

2 Likes