zhanghai / zhanghai/MaterialFiles
Raw 'NoSuchFileException' toast shown when deleting a folder and accessing it via stale navigation bar
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 9k
- Forks
- 736
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
When a folder is deleted, the app displays a raw Java exception (java8.nio.NoSuchFileException) in a Toast message instead of handling it gracefully. Furthermore, the breadcrumb navigation bar fails to update; it retains the path to the deleted folder. Clicking this stale path in the navigation bar triggers the same raw exception again.
To Reproduce
- Open the file manager and navigate to a directory containing a folder.
- Long-press a folder to select it.
- Long-press the folder again to enter it while it remains selected.
- Tap the Delete button to delete this folder.
- Issue 1: Observe a Toast displaying a raw exception: java8.nio.NoSuchFileException.
- Navigate back to the parent directory (the last folder).
- Notice that the deleted folder still appears in the top navigation bar (breadcrumbs).
- Tap the deleted folder's name in the navigation bar.
- Issue 2: Observe the same java8.nio.NoSuchFileException Toast appears again.
Expected behavior
- The app should never expose raw Java exceptions to the user
- Once a folder is deleted, the app should automatically update the breadcrumb navigation bar to remove the deleted path and safely redirect the user to the nearest existing parent directory. (or prevent the user to enter the deleted folder)
Video
https://github.com/user-attachments/assets/6fd887d4-f800-4921-96b1-1e9f19d34062
Smartphone (please complete the following information):
- OS: [Android 11]
- Version: [1.7.4]
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the deletion flow in the Android file manager on Android 11, then trace the delete action and breadcrumb navigation handlers described in the issue. The fix is done when deleting the current folder shows no raw exception, removes its stale breadcrumb, and redirects safely to the nearest existing parent directory.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100