zhanghai / zhanghai/MaterialFiles

Raw 'NoSuchFileException' toast shown when deleting a folder and accessing it via stale navigation bar

Open
#1,530 0 comments 0 reactions 0 assignees View on GitHub

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

  1. Open the file manager and navigate to a directory containing a folder.
  2. Long-press a folder to select it.
  3. Long-press the folder again to enter it while it remains selected.
  4. Tap the Delete button to delete this folder.
  5. Issue 1: Observe a Toast displaying a raw exception: java8.nio.NoSuchFileException.
  6. Navigate back to the parent directory (the last folder).
  7. Notice that the deleted folder still appears in the top navigation bar (breadcrumbs).
  8. Tap the deleted folder's name in the navigation bar.
  9. 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.