android icon indicating copy to clipboard operation
android copied to clipboard

[BUG] Creating/deleting file via DocumentProvider is not working as expected

Open donmor opened this issue 5 months ago • 5 comments

Actual behaviour

  • Create and save a file via DocumentProvider in another app, and it can't be accessed again, until opened again from SAF.
  • The failed entries has -1 as path while accessible entries has positive integers
  • Deleting a file with persistent uri in another app won't work.

Expected behaviour

  • Create and save a file, and it is created and saved

Steps to reproduce

  1. Setup an owncloud account
  2. Create a file in another app (e.g. Tiddloid) via DocumentProvider
  3. Close the file and try opening it from app's recent file list (for Tiddloid, it is the main activity)

Can this problem be reproduced with the official owncloud server? (url: https://ocis.ocis.master.owncloud.works, user: einstein, password: relativity) Unknown. I can't access this server at all.

Environment data

Android version: 13

Device model: Xiaomi 22041216C

Stock or customized system: MIUI14

ownCloud app version: 4.5.1 (43b85792e)

ownCloud server version: 7.1.3

Logs

Web server error log

None (my server is currently down)

ownCloud log (data/owncloud.log)

None (my server is currently down)

donmor avatar Jul 11 '25 00:07 donmor

Hi @donmor! i did a check with Tiddloid (installed from F-droid) and could not reproduce the problem. Tiddloid has documents provider access and it is able to save a new wiki file in the chosen folder.

I recorded a video with the steps i did to create the new file. Let me know if there is something different by comparing to your case, so that we can scope where the problem could be:

https://github.com/user-attachments/assets/fd1e7e7b-8383-42a7-bf13-cb7ac5163adb

jesmrec avatar Jul 14 '25 07:07 jesmrec

Looks like my description was wrong. Edited.

donmor avatar Jul 14 '25 08:07 donmor

BTW I can't find ownCloud in SAF "open directory" interface. Will it be an option to enable directory managing / literal path for SAF?

donmor avatar Jul 14 '25 08:07 donmor

Now, i was able to reproduce that problem, saved file was not enabled for opening/removing. Will check this.

BTW I can't find ownCloud in SAF "open directory" interface. Will it be an option to enable directory managing / literal path for SAF?

that's not implemented ftm. Only available for single files (am i right, @joragua?).

jesmrec avatar Jul 14 '25 10:07 jesmrec

Yes, right! It's only available for single files. Regarding the bug, we will take a look and see what's going on! 🍻

joragua avatar Jul 14 '25 12:07 joragua