1
0
mirror of https://github.com/rclone/rclone.git synced 2025-02-20 07:48:33 +02:00
Nick Craig-Wood 20e15e52a9 vfs: fix Create causing windows explorer to truncate files on CTRL-C CTRL-V
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
2021-03-31 14:48:02 +01:00
..
2020-10-14 15:21:31 +01:00
2019-04-15 21:49:58 +01:00
2020-11-26 16:40:12 +00:00
2020-10-14 15:21:31 +01:00
2020-10-28 18:16:23 +00:00