This looks like it could miss files on import.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4573 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
parent
566d00f0df
commit
071c2f1c20
@ -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)
|
if (unzGoToFirstFile(zip) == UNZ_OK)
|
||||||
{
|
{
|
||||||
while (unzGoToNextFile(zip) == UNZ_OK)
|
do
|
||||||
{
|
{
|
||||||
char file_path[256];
|
char file_path[256];
|
||||||
unz_file_info64 info = { 0 };
|
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);
|
tf_printf("Importing from %s.\n", zip_path);
|
||||||
if (unzGoToFirstFile(zip) == UNZ_OK)
|
if (unzGoToFirstFile(zip) == UNZ_OK)
|
||||||
{
|
{
|
||||||
while (unzGoToNextFile(zip) == UNZ_OK)
|
do
|
||||||
{
|
{
|
||||||
char file_path[256];
|
char file_path[256];
|
||||||
unz_file_info64 info = { 0 };
|
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);
|
unzClose(zip);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user