Skip to content

Commit

Permalink
Update fm.c
Browse files Browse the repository at this point in the history
-Improved the detection of "..". It now allows the user to enter folders named "...", "....", etc should they have any.
  • Loading branch information
Alann-Mints authored Feb 18, 2023
1 parent a8fd31e commit 4061d14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fm_exFAT/source/fm.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ int fm_panel_enter (struct fm_panel *p)
char np[CBSIZE];
if (p->path)
{
if (!strncmp(p->current->name, "..", 2)/*p->current_idx == 0*/) { fm_panel_exit (p); return 0; }
if (strlen(p->current->name) == 2 && !strncmp(p->current->name, "..", 2)) { fm_panel_exit (p); return 0; }
if (p->current && p->current->name && *(p->current->name))
snprintf (np, CBSIZE, "%s/%s", p->path, p->current->name);
else
Expand Down

0 comments on commit 4061d14

Please sign in to comment.