Commit be7296f
authored
fix(file-explorer): prevent entering files as directories (#5383)
The file_explorer example had two issues:
1. Used heuristic (contains '.') to detect files vs directories, which is unreliable
2. Tried to enter files as directories when clicked, causing errors
Changes:
- Use path.is_file() for accurate file detection
- Use path.is_dir() check before entering a directory
- Rename shadowed 'path' variable to 'path_display'
Fixes #5368
Co-authored-by: BillionClaw <267901332+BillionClaw@users.noreply.github.com>1 parent 049e441 commit be7296f
1 file changed
+7
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
| 35 | + | |
35 | 36 | | |
36 | | - | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | | - | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| |||
115 | 116 | | |
116 | 117 | | |
117 | 118 | | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
118 | 122 | | |
119 | 123 | | |
120 | 124 | | |
| |||
0 commit comments