projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5302f2c
)
Try to fix crash when zip_open_from_source returns an error.
author
Carl Hetherington
<cth@carlh.net>
Sun, 14 Oct 2018 00:28:14 +0000
(
01:28
+0100)
committer
Carl Hetherington
<cth@carlh.net>
Sun, 14 Oct 2018 00:28:14 +0000
(
01:28
+0100)
src/lib/internet.cc
patch
|
blob
|
history
diff --git
a/src/lib/internet.cc
b/src/lib/internet.cc
index 662a82443623ed256af0394c75dbfa6b8a505972..d6fb02a17cf8f7e7002cb83123aa916ea1a0c13a 100644
(file)
--- a/
src/lib/internet.cc
+++ b/
src/lib/internet.cc
@@
-119,9
+119,10
@@
get_from_zip_url (string url, string file, bool pasv, function<void (boost::file
return optional<string> (_("Could not open downloaded ZIP file"));
}
- zip_t* zip = zip_open_from_source (zip_source, 0, 0);
+ zip_error_t error;
+ zip_t* zip = zip_open_from_source (zip_source, ZIP_RDONLY, &error);
if (!zip) {
- return
optional<string> (_("Could not open downloaded ZIP file")
);
+ return
String::compose (_("Could not open downloaded ZIP file (%1)"), error.str ? error.str : ""
);
}
#else