projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1b050fd
)
fixed compiler warning
author
Holger Schemel
<info@artsoft.org>
Sun, 17 Feb 2019 21:01:13 +0000
(22:01 +0100)
committer
Holger Schemel
<info@artsoft.org>
Sun, 17 Feb 2019 21:01:13 +0000
(22:01 +0100)
src/libgame/zip/miniunz.c
patch
|
blob
|
history
diff --git
a/src/libgame/zip/miniunz.c
b/src/libgame/zip/miniunz.c
index b068486e457ffb190eae8f754e0682fd01ef2106..285d10ed4ecfd3683726a9f9a20d814ce27c561c 100644
(file)
--- a/
src/libgame/zip/miniunz.c
+++ b/
src/libgame/zip/miniunz.c
@@
-639,7
+639,14
@@
char **zip_extract(char *filename, char *directory)
int success = (miniunz_extract_all(uf, 0, 1, NULL) == UNZ_OK);
- CHDIR(last_directory); // change back to previous directory
+ if (CHDIR(last_directory)) // change back to previous directory
+ {
+ debug_printf("Cannot change to directory '%s'!\n", last_directory);
+
+ unzClose(uf);
+
+ return NULL;
+ }
unzClose(uf);