projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added support for more event types for global animations (yet to be added)
[rocksndiamonds.git]
/
src
/
libgame
/
zip
/
miniunz.c
diff --git
a/src/libgame/zip/miniunz.c
b/src/libgame/zip/miniunz.c
index b068486e457ffb190eae8f754e0682fd01ef2106..cf9839b1bb6c2cb303467e05942181e4c63c8cb4 100644
(file)
--- a/
src/libgame/zip/miniunz.c
+++ b/
src/libgame/zip/miniunz.c
@@
-628,18
+628,25
@@
char **zip_extract(char *filename, char *directory)
return NULL;
}
return NULL;
}
- if (CHDIR(directory)
)
// change to target directory
+ if (CHDIR(directory)
!= 0)
// change to target directory
{
{
- debug_printf("Cannot change to directory '%s'!\n", directory);
+
debug_printf("Cannot change to directory '%s'!\n", directory);
- unzClose(uf);
+
unzClose(uf);
- return NULL;
+
return NULL;
}
int success = (miniunz_extract_all(uf, 0, 1, NULL) == UNZ_OK);
}
int success = (miniunz_extract_all(uf, 0, 1, NULL) == UNZ_OK);
- CHDIR(last_directory); // change back to previous directory
+ if (CHDIR(last_directory) != 0) // change back to previous directory
+ {
+ debug_printf("Cannot change to directory '%s'!\n", last_directory);
+
+ unzClose(uf);
+
+ return NULL;
+ }
unzClose(uf);
unzClose(uf);