mirror of
https://github.com/rclone/rclone.git
synced 2025-11-29 05:47:23 +02:00
Before this fix, doing CTRL-C and CTRL-V on a file in Windows explorer caused the **source** and the the destination to be truncated to 0. This is because Windows opens the source file with Create with flags `O_RDWR|O_CREATE|O_EXCL` but doesn't write to it - it only reads from it. Rclone was taking the call to Create as a signal to always make a new file, but this is incorrect. This fix reads an existing file from the directory if it exists when Create is called rather than always creating a new one. This fixes the problem. Fixes #5181
16 KiB
16 KiB