Skip to content

fix: Check file existence before using save as#5372

Draft
juliusknorr wants to merge 1 commit intomainfrom
fix/saveas-existing-file
Draft

fix: Check file existence before using save as#5372
juliusknorr wants to merge 1 commit intomainfrom
fix/saveas-existing-file

Conversation

@juliusknorr
Copy link
Member

@juliusknorr juliusknorr commented Feb 17, 2026

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.

@juliusknorr juliusknorr requested a review from elzody as a code owner February 17, 2026 14:23
@juliusknorr juliusknorr added bug Something isn't working 3. to review Ready to be reviewed labels Feb 17, 2026
@elzody elzody force-pushed the fix/saveas-existing-file branch from 426f5e5 to 773389e Compare February 18, 2026 00:42
Signed-off-by: Julius Knorr <jus@bitgrid.net>
@juliusknorr juliusknorr force-pushed the fix/saveas-existing-file branch from 773389e to 8f54906 Compare February 18, 2026 21:25
@moodyjmz
Copy link

@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?

@juliusknorr
Copy link
Member Author

juliusknorr commented Feb 19, 2026

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:
https://github.com/nextcloud/richdocuments/blob/main/docs/mobile_editor.md

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.

@moodyjmz
Copy link

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: https://github.com/nextcloud/richdocuments/blob/main/docs/mobile_editor.md

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 :)

@moodyjmz moodyjmz self-assigned this Feb 19, 2026
@moodyjmz moodyjmz marked this pull request as draft February 19, 2026 10:29
@moodyjmz moodyjmz changed the title fix: Check file existencen before using save as fix: Check file existence before using save as Feb 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Ready to be reviewed bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments