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

Scoped storage can't RMD non-dir with FX File Explorer #253

Open
Xavron opened this issue Oct 17, 2024 · 0 comments
Open

Scoped storage can't RMD non-dir with FX File Explorer #253

Xavron opened this issue Oct 17, 2024 · 0 comments

Comments

@Xavron
Copy link

Xavron commented Oct 17, 2024

Reproduce

Happens with user set to internal dir DCIM. And "/DCIM/eclipse/php-2023-03" is the test dir that won't delete. (There's some other dirs that fail RMD as well.)

Problem

This is because the dir is duplicated in the path here: path + File.separator + finalParam. There's multiple conflicts here of this sort with FX File Explorer. There's several variations on this with a wrong path being created.

  • One problem here is that the working dir may have the param (including a filename here), not the param itself. So that the param needs to be discarded as its of no use.

  • I guess that's another point. The param here is different from the working dir so that only the param is correct. For other conflicts it is not. The working dir here contains a fail so that looking at this, the result becomes incorrect.

This conflicts with other clients as eg Samsung Files, FileZilla, WinSCP. They all delete it successfully.

Other dirs delete fine with FX File Explorer so am not sure why it changes - looks like this may be how the working dir differs from the param. Did not look into it but believe the working dir is not current. Therefore, some dirs may be correct with paths, and some may not be as the working dir may have a file when the current command is to RMD a dir.

FTPS explicit, Android 8.

Not tested against java.io.File. That is separate code so it will have its own things that are not a part of this issue.

Fix

An easy fix has been found and tested to success with no bad conflicts noticed. However, will be doing further testing to make sure of things and possibly some minor code changes if possible. It could still take a while or not. Just no way to know because of how clients heavily conflict here.

Edit: Taking a break on the app for now. Plan to get to this in 2025 sometime. Maybe closer to Android 16 release.

@Xavron Xavron changed the title Scoped storage can't RMD non-dir with FX File Explorer to internal location Scoped storage (probably java.io.File too) can't RMD non-dir with FX File Explorer Dec 13, 2024
@Xavron Xavron changed the title Scoped storage (probably java.io.File too) can't RMD non-dir with FX File Explorer Scoped storage can't RMD non-dir with FX File Explorer Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant