summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dirs.cpp7
-rw-r--r--src/utils/files.cpp5
2 files changed, 6 insertions, 6 deletions
diff --git a/src/dirs.cpp b/src/dirs.cpp
index 4b374e86c..7dc53803b 100644
--- a/src/dirs.cpp
+++ b/src/dirs.cpp
@@ -184,11 +184,6 @@ void Dirs::extractDataDir()
Files::extractLocale();
#endif
#endif
-
-#if defined __native_client__
- const std::string dirName = _nacl_dir.append("/data");
- Files::extractZip("/http/data.zip", "data", dirName);
-#endif
}
void Dirs::mountDataDir()
@@ -231,7 +226,7 @@ void Dirs::mountDataDir()
#endif
#if defined __native_client__
- resourceManager->addToSearchPath(_nacl_dir.append("/data"), Append_false);
+ resourceManager->addToSearchPath("/http/data.zip", Append_false);
#endif
// Add branding/data to PhysFS search path
diff --git a/src/utils/files.cpp b/src/utils/files.cpp
index 07e3b2e83..726f33225 100644
--- a/src/utils/files.cpp
+++ b/src/utils/files.cpp
@@ -258,6 +258,11 @@ std::string Files::getPath(const std::string &file)
if (tmp)
{
path = std::string(tmp).append(dirSeparator).append(file);
+#if defined __native_client__
+ std::string dataZip = "/http/data.zip/";
+ if (path.substr(0, dataZip.length()) == dataZip)
+ path = path.replace(0, dataZip.length(), "/http/data/");
+#endif
}
else
{