fix: Check file existence before using save as#5372
Conversation
426f5e5 to
773389e
Compare
Signed-off-by: Julius Knorr <jus@bitgrid.net>
773389e to
8f54906
Compare
|
@juliusknorr the code looks good. I see there are some build and merge issues. Also, could you point me at something, or tell me how to test this? |
|
The failing test indeed seems related to the change as it is affecting the save as feature to save a document under a new name. However it seems to only occur in the "direct editing" mode. This direct editing mode is used by the Nextcloud mobile clients to open office for editing in a webview: To manually test this you can use the steps from #4739 (comment) Could you maybe take over and see if it is a valid failure and if so work on a fix? Ping me if you need more assistance for getting this up locally or running tests locally. |
Yep, I can take over, I will try getting it up locally alone first - sometimes mistakes are good :) |
When using the "Save as" function you may end up saving files with the same name which did not lead to a expected copy then. This extends to check for existence before issuing the save as method with Collabora.
In the future a file picker could be used for the folder but we would need to extend that with a name input and further logic in the library so this is a smaller change that can be backported.