Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FM claims that it needs root to delete a file #142

Closed
7 tasks done
mimi89999 opened this issue Mar 11, 2025 · 15 comments
Closed
7 tasks done

FM claims that it needs root to delete a file #142

mimi89999 opened this issue Mar 11, 2025 · 15 comments
Labels
invalid This does not seem right

Comments

@mimi89999
Copy link

Checklist

  • I can reproduce the bug with the latest version given here.
  • I made sure that there are no existing issues - open or closed - to which I could contribute my information.
  • I made sure that there are no existing discussions - open or closed - to which I could contribute my information.
  • I have read the FAQs inside the app (Menu -> About -> FAQs) and my problem isn't listed.
  • I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
  • This issue contains only one bug.
  • I have read and understood the contribution guidelines.

Affected app version

1.0.1

Affected Android/Custom ROM version

Android 15

Affected device model

Sony Xperia 5 V

How did you install the app?

F-Droid / IzzyOnDroid

Steps to reproduce the bug

  1. Go to the Download folder
  2. Select a file
  3. Click on the trash bin icon and confirm deletion

Expected behavior

The file should get deleted

Actual behavior

FM claim that this operation only works on rooted devices

Screenshots/Screen recordings

No response

Additional information

Other file manager like https://f-droid.org/packages/me.zhanghai.android.files/ are able to delete files in that location.

@mimi89999 mimi89999 added bug Something is not working needs triage Issue is not yet ready for PR authors to take up labels Mar 11, 2025
@naveensingh
Copy link
Member

  • Does it happen always or randomly?
  • Where is this Download folder located? Is it the default/internal storage or an SD Card?
  • Do you have any screenshots/recordings for this?

@naveensingh naveensingh added waiting for author If the author does not respond, the issue will be closed. Otherwise, the label will be removed. question Further information is requested labels Mar 11, 2025
@mimi89999
Copy link
Author

It happens always. The reported file path is /sdcard/Download

@naveensingh
Copy link
Member

One more:

  • How was this file created? Was it downloaded using some browser or was it transferred from some other device?

@mimi89999
Copy link
Author

The file was downloaded with Firefox

@naveensingh
Copy link
Member

Do you have any screenshots/recordings for this?

Would be great if you could share a screen recording.

@naveensingh naveensingh removed waiting for author If the author does not respond, the issue will be closed. Otherwise, the label will be removed. question Further information is requested labels Mar 11, 2025
@mimi89999
Copy link
Author

There is not much going on. Just a toast at the bottom of the screen with the error message appearing.

@mimi89999
Copy link
Author

5db3bb5f-c3ee-4e0a-a2d1-285a3fbe92d1.mp4

@naveensingh
Copy link
Member

This function is probably returning true when it shouldn't meaning the SD Card path is being treated as a system directory by the app.

May or may not be related to #82 but this does seem like a device specific issue.

@naveensingh naveensingh added the device/software specific Issues that only happen on some devices or with some specific hardware/software label Mar 11, 2025
@mimi89999
Copy link
Author

Maybe the logic could be improved to better handle such cases? What would happen if the app attempted to delete the file even if it was not allowed to?

I can build the app and add some logging if that can help fix the issue.

@naveensingh
Copy link
Member

naveensingh commented Mar 11, 2025

Maybe the logic could be improved to better handle such cases? What would happen if the app attempted to delete the file even if it was not allowed to?

Yes. A SecurityException would be thrown, probably.

I can build the app and add some logging if that can help fix the issue.

More investigation is due but the code that "finds" the SD card path is located inside the commons library: https://github.com/FossifyOrg/Commons/blob/3dd1f7f33ec9d7001a6a81584917971bdf44f50c/commons/src/main/kotlin/org/fossify/commons/extensions/Context-storage.kt#L37

For a start, you may try to log the config.sdCardPath value and compare it with the path that is shown in the file properties dialog.

@mimi89999
Copy link
Author

I built the latest version from source and file deletion just works there.

@naveensingh
Copy link
Member

I built the latest version from source and file deletion just works there.

That is strange. Can you try again with a clean install of the official version?

@mimi89999
Copy link
Author

I uninstalled and installed the app. Deleting files now also works.

@naveensingh
Copy link
Member

Maybe a device or SD Card issue. Closing for now, will reopen if it's reported again.

@naveensingh naveensingh closed this as not planned Won't fix, can't repro, duplicate, stale Mar 12, 2025
@naveensingh naveensingh added invalid This does not seem right and removed device/software specific Issues that only happen on some devices or with some specific hardware/software bug Something is not working needs triage Issue is not yet ready for PR authors to take up labels Mar 12, 2025
@mimi89999
Copy link
Author

It seems that my device is haunted 👻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This does not seem right
Projects
None yet
Development

No branches or pull requests

2 participants