Skip to content
Snippets Groups Projects
Commit 685e271b authored by rswindell's avatar rswindell
Browse files

unpack_bundle() now supports any-case file extensions (e.g. ".SA or .sa")

on Unix.
parent e2078232
No related branches found
No related tags found
No related merge requests found
...@@ -1784,6 +1784,31 @@ BOOL unpack_bundle(void) ...@@ -1784,6 +1784,31 @@ BOOL unpack_bundle(void)
static int gi; static int gi;
for(i=0;i<7;i++) { for(i=0;i<7;i++) {
#if defined(__unix__) /* support upper or lower case */
switch(i) {
case 0:
p="[Ss][Uu]";
break;
case 1:
p="[Mm][Oo]";
break;
case 2:
p="[Tt][Uu]";
break;
case 3:
p="[Ww][Ee]";
break;
case 4:
p="[Tt][Hh]";
break;
case 5:
p="[Ff][Rr]";
break;
default:
p="[Ss][Aa]";
break;
}
#else
switch(i) { switch(i) {
case 0: case 0:
p="su"; p="su";
...@@ -1807,6 +1832,7 @@ BOOL unpack_bundle(void) ...@@ -1807,6 +1832,7 @@ BOOL unpack_bundle(void)
p="sa"; p="sa";
break; break;
} }
#endif
sprintf(str,"%s*.%s?",secure ? cfg.secure : cfg.inbound,p); sprintf(str,"%s*.%s?",secure ? cfg.secure : cfg.inbound,p);
if(gi>=g.gl_pathc) { if(gi>=g.gl_pathc) {
gi=0; gi=0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment