File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -1224,12 +1224,6 @@ struct DirentComp
1224
1224
if ((de1.de .d_type == DT_DIR) && (de2.de .d_type != DT_DIR)) return true ;
1225
1225
if ((de1.de .d_type != DT_DIR) && (de2.de .d_type == DT_DIR)) return false ;
1226
1226
1227
- if ((de1.de .d_type == DT_DIR) && (de2.de .d_type == DT_DIR))
1228
- {
1229
- if (!(de1.flags & DT_EXT_ZIP) && (de2.flags & DT_EXT_ZIP)) return true ;
1230
- if ((de1.flags & DT_EXT_ZIP) && !(de2.flags & DT_EXT_ZIP)) return false ;
1231
- }
1232
-
1233
1227
int len1 = strlen (de1.altname );
1234
1228
int len2 = strlen (de2.altname );
1235
1229
if ((len1 > 4 ) && (de1.altname [len1 - 4 ] == ' .' )) len1 -= 4 ;
Original file line number Diff line number Diff line change @@ -7107,6 +7107,10 @@ void PrintDirectory(int expand)
7107
7107
{
7108
7108
strncpy (s + 1 , flist_DirItem (k)->altname +1 , len-1 );
7109
7109
}
7110
+ else if (flist_DirItem (k)->flags & DT_EXT_ZIP)
7111
+ {
7112
+ strncpy (s + 1 , flist_DirItem (k)->altname , len-4 ); // strip .zip extension, see below
7113
+ }
7110
7114
else
7111
7115
{
7112
7116
strncpy (s + 1 , flist_DirItem (k)->altname , len); // display only name
@@ -7122,7 +7126,7 @@ void PrintDirectory(int expand)
7122
7126
else
7123
7127
{
7124
7128
if (flist_DirItem (k)->flags & DT_EXT_ZIP) // mark ZIP archive with different suffix
7125
- strcpy (&s[22 ], " <zip >" );
7129
+ strcpy (&s[22 ], " <ZIP >" );
7126
7130
else
7127
7131
strcpy (&s[22 ], " <DIR>" );
7128
7132
}
You can’t perform that action at this time.
0 commit comments