Skip to content

Commit

Permalink
nyx: Fix archive bits fixer and extention folders
Browse files Browse the repository at this point in the history
  • Loading branch information
CTCaer committed May 5, 2020
1 parent f085cbc commit 9698cbc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion nyx/nyx_gui/frontend/gui_tools.c
Original file line number Diff line number Diff line change
Expand Up @@ -839,8 +839,13 @@ static int _fix_attributes(lv_obj_t *lb_val, char *path, u32 *total)
// Is it a directory?
if (fno.fattrib & AM_DIR)
{
// Check if it's a HOS single file folder.
strcat(path, "/00");
bool is_hos_special = !f_stat(path, NULL);
path[strlen(path) - 3] = 0;

// Set archive bit to folders with 3 char extension suffix.
if (fno.fname[strlen(fno.fname) - 4] == '.')
if (is_hos_special && fno.fname[strlen(fno.fname) - 4] == '.')
{
if (!(fno.fattrib & AM_ARC))
{
Expand Down

0 comments on commit 9698cbc

Please sign in to comment.