diff --git a/src/ssb.import.c b/src/ssb.import.c index eca5d30a..a03edd30 100644 --- a/src/ssb.import.c +++ b/src/ssb.import.c @@ -284,7 +284,7 @@ static void _tf_ssb_import_recursive_add_files_from_zip(tf_ssb_t* ssb, unzFile z { if (unzGoToFirstFile(zip) == UNZ_OK) { - while (unzGoToNextFile(zip) == UNZ_OK) + do { char file_path[256]; unz_file_info64 info = { 0 }; @@ -307,6 +307,7 @@ static void _tf_ssb_import_recursive_add_files_from_zip(tf_ssb_t* ssb, unzFile z } } } + while (unzGoToNextFile(zip) == UNZ_OK); } } @@ -359,7 +360,7 @@ void tf_ssb_import_from_zip(tf_ssb_t* ssb, const char* zip_path, const char* use tf_printf("Importing from %s.\n", zip_path); if (unzGoToFirstFile(zip) == UNZ_OK) { - while (unzGoToNextFile(zip) == UNZ_OK) + do { char file_path[256]; unz_file_info64 info = { 0 }; @@ -377,6 +378,7 @@ void tf_ssb_import_from_zip(tf_ssb_t* ssb, const char* zip_path, const char* use } } } + while (unzGoToNextFile(zip) == UNZ_OK); } unzClose(zip); }