Builds for Haiku.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4584 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2023-10-26 02:56:33 +00:00
parent b695a4ba3b
commit 68f5827dee
7 changed files with 60 additions and 22 deletions

View File

@ -282,7 +282,7 @@ static char* _tf_ssb_import_read_current_file_from_zip(unzFile zip, size_t* size
static void _tf_ssb_import_recursive_add_files_from_zip(tf_ssb_t* ssb, unzFile zip, JSContext* context, JSValue files, const char* root)
{
if (unzGoToFirstFile(zip) == UNZ_OK)
if (root && unzGoToFirstFile(zip) == UNZ_OK)
{
do
{
@ -355,7 +355,7 @@ static void _tf_ssb_import_app_json_from_zip(tf_ssb_t* ssb, unzFile zip, JSConte
void tf_ssb_import_from_zip(tf_ssb_t* ssb, const char* zip_path, const char* user, const char* path)
{
unzFile zip = unzOpen(zip_path);
if (zip)
if (zip && path)
{
tf_printf("Importing from %s.\n", zip_path);
if (unzGoToFirstFile(zip) == UNZ_OK)