From 882c3a2a76ee684c973eadbf3ab4764a183cdba3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Madar=C3=A1sz?= Date: Tue, 10 Oct 2023 12:15:14 +0200 Subject: [PATCH] vfs: fix zip enum --- engine/joint/v4k.h | 7 +++++-- engine/split/v4k_file.c | 7 +++++-- engine/v4k.c | 7 +++++-- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/engine/joint/v4k.h b/engine/joint/v4k.h index 3cc65d0..d284898 100644 --- a/engine/joint/v4k.h +++ b/engine/joint/v4k.h @@ -587013,7 +587013,7 @@ const char** file_list(const char *cwd, const char *masks) { } array_resize(list, 0);//array_free(list); - dir *d = dir_open(cwd, "rb"); + dir *d = dir_open(cwd, strstr(masks,"**") ? "r" : ""); if( d ) { for( int i = 0; i < dir_count(d); ++i ) { if( dir_file(d,i) ) { @@ -587391,7 +587391,10 @@ void vfs_reload() { // if( vfs_mount(va("%s.%02x", app, i)) ) continue; } */ // faster way - for( const char **file = file_list("./","*.zip"); *file; ++file) vfs_mount(*file); + for( const char **file = file_list("./","*.zip"); *file; ++file) { + // PRINTF("VFS mounted: %s\n", *file); + vfs_mount(*file); + } #endif // vfs_resolve() will use these art_folder locations as hints when cook-on-demand is in progress. diff --git a/engine/split/v4k_file.c b/engine/split/v4k_file.c index 47d45b4..ca7f8d6 100644 --- a/engine/split/v4k_file.c +++ b/engine/split/v4k_file.c @@ -212,7 +212,7 @@ const char** file_list(const char *cwd, const char *masks) { } array_resize(list, 0);//array_free(list); - dir *d = dir_open(cwd, "rb"); + dir *d = dir_open(cwd, strstr(masks,"**") ? "r" : ""); if( d ) { for( int i = 0; i < dir_count(d); ++i ) { if( dir_file(d,i) ) { @@ -590,7 +590,10 @@ void vfs_reload() { // if( vfs_mount(va("%s.%02x", app, i)) ) continue; } */ // faster way - for( const char **file = file_list("./","*.zip"); *file; ++file) vfs_mount(*file); + for( const char **file = file_list("./","*.zip"); *file; ++file) { + // PRINTF("VFS mounted: %s\n", *file); + vfs_mount(*file); + } #endif // vfs_resolve() will use these art_folder locations as hints when cook-on-demand is in progress. diff --git a/engine/v4k.c b/engine/v4k.c index 3cb40b3..3c45db0 100644 --- a/engine/v4k.c +++ b/engine/v4k.c @@ -5187,7 +5187,7 @@ const char** file_list(const char *cwd, const char *masks) { } array_resize(list, 0);//array_free(list); - dir *d = dir_open(cwd, "rb"); + dir *d = dir_open(cwd, strstr(masks,"**") ? "r" : ""); if( d ) { for( int i = 0; i < dir_count(d); ++i ) { if( dir_file(d,i) ) { @@ -5565,7 +5565,10 @@ void vfs_reload() { // if( vfs_mount(va("%s.%02x", app, i)) ) continue; } */ // faster way - for( const char **file = file_list("./","*.zip"); *file; ++file) vfs_mount(*file); + for( const char **file = file_list("./","*.zip"); *file; ++file) { + // PRINTF("VFS mounted: %s\n", *file); + vfs_mount(*file); + } #endif // vfs_resolve() will use these art_folder locations as hints when cook-on-demand is in progress.