diff --git a/file_io.cpp b/file_io.cpp index 9733f74..51dc4ed 100644 --- a/file_io.cpp +++ b/file_io.cpp @@ -1475,7 +1475,7 @@ int ScanDirectory(char* path, int mode, const char *extension, int options, cons { const char *ext = extension; int found = (has_trd && x2trd_ext_supp(de->d_name)); - if (!found && !strcasecmp(de->d_name + strlen(de->d_name) - 4, ".zip") && (options & SCANO_DIR)) + if (!found && !(options & SCANO_NOZIP) && !strcasecmp(de->d_name + strlen(de->d_name) - 4, ".zip") && (options & SCANO_DIR)) { // Fake that zip-file is a directory. de->d_type = DT_DIR; diff --git a/file_io.h b/file_io.h index fdfe086..b37385e 100644 --- a/file_io.h +++ b/file_io.h @@ -50,12 +50,13 @@ direntext_t* flist_SelectedItem(); #define SCANF_END 4 // find last file in directory // options flags -#define SCANO_DIR 1 // include subdirectories -#define SCANO_UMOUNT 2 // allow backspace key -#define SCANO_CORES 4 // only include subdirectories with prefix '_' -#define SCANO_TXT 8 -#define SCANO_NEOGEO 16 -#define SCANO_NOENTER 32 +#define SCANO_DIR 0b00000001 // include subdirectories +#define SCANO_UMOUNT 0b00000010 // allow backspace key +#define SCANO_CORES 0b00000100 // only include subdirectories with prefix '_' +#define SCANO_TXT 0b00001000 +#define SCANO_NEOGEO 0b00010000 +#define SCANO_NOENTER 0b00100000 +#define SCANO_NOZIP 0b01000000 void FindStorage(); int getStorage(int from_setting); diff --git a/menu.cpp b/menu.cpp index 6035f76..f53df8c 100644 --- a/menu.cpp +++ b/menu.cpp @@ -1978,6 +1978,8 @@ void HandleUI(void) char *p = strrchr(Selected_tmp, '/'); if (p) *p = 0; } + + fs_Options |= SCANO_NOZIP; } if (select) SelectFile(Selected_tmp, ext, fs_Options, fs_MenuSelect, fs_MenuCancel);