change zip sorting again (#943)

* file_io: sort zips with directories again

* menu: strip now-redundant .zip extension, make <ZIP> suffix match <DIR>
This commit is contained in:
dana
2024-12-23 01:57:13 -06:00
committed by GitHub
parent 7e40f55c37
commit 10176338cc
2 changed files with 5 additions and 7 deletions

View File

@@ -1224,12 +1224,6 @@ struct DirentComp
if ((de1.de.d_type == DT_DIR) && (de2.de.d_type != DT_DIR)) return true;
if ((de1.de.d_type != DT_DIR) && (de2.de.d_type == DT_DIR)) return false;
if ((de1.de.d_type == DT_DIR) && (de2.de.d_type == DT_DIR))
{
if (!(de1.flags & DT_EXT_ZIP) && (de2.flags & DT_EXT_ZIP)) return true;
if ((de1.flags & DT_EXT_ZIP) && !(de2.flags & DT_EXT_ZIP)) return false;
}
int len1 = strlen(de1.altname);
int len2 = strlen(de2.altname);
if ((len1 > 4) && (de1.altname[len1 - 4] == '.')) len1 -= 4;