diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-05-22 19:00:05 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-05-22 20:01:44 +0300 |
commit | 79d620a4b41e877d7b50f1537f135c85ac9ddc73 (patch) | |
tree | e6035ea917d2e46810adb3361533b2c3e36fda33 | |
parent | 7ca25eb87966f805265cd22086af8c113b7af822 (diff) | |
download | manaplus-79d620a4b41e877d7b50f1537f135c85ac9ddc73.tar.gz manaplus-79d620a4b41e877d7b50f1537f135c85ac9ddc73.tar.bz2 manaplus-79d620a4b41e877d7b50f1537f135c85ac9ddc73.tar.xz manaplus-79d620a4b41e877d7b50f1537f135c85ac9ddc73.zip |
Dont unpack data.zip on Android.
-rw-r--r-- | src/dirs.cpp | 4 | ||||
-rw-r--r-- | src/fs/files.cpp | 10 | ||||
-rw-r--r-- | src/fs/files.h | 3 |
3 files changed, 3 insertions, 14 deletions
diff --git a/src/dirs.cpp b/src/dirs.cpp index 878bd62f8..6f867ba91 100644 --- a/src/dirs.cpp +++ b/src/dirs.cpp @@ -179,7 +179,9 @@ void Dirs::extractDataDir() const std::string zipName = pathJoin(getenv("APPDIR"), "data.zip"); const std::string dirName = pathJoin(getenv("APPDIR"), "data"); - Files::extractZip(zipName, "data", dirName); + VirtFs::mountZip2(zipName, + "data", + Append_false); Files::extractLocale(); #endif // defined(ANDROID) && defined(USE_SDL2) } diff --git a/src/fs/files.cpp b/src/fs/files.cpp index a6b8d0d4d..7cefef985 100644 --- a/src/fs/files.cpp +++ b/src/fs/files.cpp @@ -123,16 +123,6 @@ void Files::copyVirtFsDir(const std::string &restrict inDir, VirtFs::freeList(files); } -void Files::extractZip(const std::string &restrict zipName, - const std::string &restrict inDir, - const std::string &restrict outDir) -{ - VirtFs::mountZip(zipName, Append_false); - copyVirtFsDir(inDir, outDir); - VirtFs::unmountZip(zipName); - remove(zipName.c_str()); -} - #endif // ANDROID __native_client__ int Files::renameFile(const std::string &restrict srcName, diff --git a/src/fs/files.h b/src/fs/files.h index fa6833da4..146a85ff1 100644 --- a/src/fs/files.h +++ b/src/fs/files.h @@ -42,9 +42,6 @@ namespace Files void copyVirtFsDir(const std::string &restrict inDir, const std::string &restrict outDir); - void extractZip(const std::string &restrict zipName, - const std::string &restrict inDir, - const std::string &restrict outDir); #endif // ANDROID __native_client__ int renameFile(const std::string &restrict pFrom, |