summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-03-06 19:33:56 +0300
committerAndrei Karas <akaras@inbox.ru>2017-03-06 20:03:30 +0300
commit4194c632d90b144595422abe4aab308e7928511a (patch)
tree53cf82ea85075d08e77893711e907259950ec9eb /src
parent7c183b661c7ba59bcf489098462ab4373d126234 (diff)
downloadplus-4194c632d90b144595422abe4aab308e7928511a.tar.gz
plus-4194c632d90b144595422abe4aab308e7928511a.tar.bz2
plus-4194c632d90b144595422abe4aab308e7928511a.tar.xz
plus-4194c632d90b144595422abe4aab308e7928511a.zip
Add binary access mode in read zip archives.
By default windows using text mode for read/write files.
Diffstat (limited to 'src')
-rw-r--r--src/fs/virtfs/zip.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fs/virtfs/zip.cpp b/src/fs/virtfs/zip.cpp
index 3a4e349dc..8dd7d8080 100644
--- a/src/fs/virtfs/zip.cpp
+++ b/src/fs/virtfs/zip.cpp
@@ -61,7 +61,7 @@ namespace Zip
std::vector<ZipLocalHeader*> &restrict headers = entry->mHeaders;
std::vector<std::string> &restrict dirs = entry->mDirs;
FILE *restrict const arcFile = fopen(archiveName.c_str(),
- "r");
+ "rb");
if (arcFile == nullptr)
{
reportAlways("Can't open zip file %s",
@@ -216,7 +216,7 @@ namespace Zip
}
FILE *restrict const arcFile = fopen(
header->zipEntry->root.c_str(),
- "r");
+ "rb");
if (arcFile == nullptr)
{
reportAlways("Can't open zip file %s",