Open timmc opened 2 years ago
That's a good call-out, I'll add a warning if the rename will potentially overwrite an existing file.
Not tested, but can I assume it may do the same if you move pluto.jpg into a folder where a pluto.jpg already exists?
Yes, same result.
I wonder if it would also be worth doing a second check during the actual file move/rename operation, like so:
aaa.jpg
to xxx.jpg
(where xxx.jpg
does not exist)xxx.jpg
is uploaded]mv
operationxxx.jpg
already exists"The WebDAV spec handles MOVE
conflicts by passing a header Overwrite: T
or Overwrite: F
. I think perhaps the right thing to do is to attempt to do the MOVE
with Overwrite: F
and catch the error, prompting to overwrite or cancel.
This works fine on single-file moves or renames, but is going to be tricky on files where many files may end up with conflicts...
If I create a fresh Davros grain and rename
shuttle.jpg
topluto.jpg
,pluto.jpg
is overwritten. This matches the behavior of Unix'smv
command, but should probably issue a warning/confirmation dialog.(This is with experimental version 0.31.1.)