浏览代码

use shared path as user data when available

Andrey Filipenkov 4 年之前
父节点
当前提交
13d0de17cd
共有 1 个文件被更改,包括 3 次插入8 次删除
  1. 3 8
      lib/VCMIDirs.cpp

+ 3 - 8
lib/VCMIDirs.cpp

@@ -388,11 +388,9 @@ class VCMIDirsIOS final : public VCMIDirsApple
 
 		bfs::path libraryPath() const override;
 		bfs::path binaryPath() const override;
-
-		bool developmentMode() const override;
 };
 
-bfs::path VCMIDirsIOS::userDataPath() const { return {ios_documentsPath()}; }
+bfs::path VCMIDirsIOS::userDataPath() const { return {ios_sharedDataPath() ?: ios_documentsPath()}; }
 bfs::path VCMIDirsIOS::userCachePath() const { return {ios_cachesPath()}; }
 bfs::path VCMIDirsIOS::userLogsPath() const { return {ios_documentsPath()}; }
 
@@ -403,17 +401,14 @@ std::vector<bfs::path> VCMIDirsIOS::dataPaths() const
 #ifdef VCMI_IOS_SIM
     paths.emplace_back(ios_hostApplicationSupportPath());
 #endif
-    if (auto sharedDataPath = ios_sharedDataPath())
-        paths.emplace_back(sharedDataPath);
-    paths.emplace_back(binaryPath());
     paths.emplace_back(userDataPath());
+    paths.emplace_back(ios_documentsPath());
+    paths.emplace_back(binaryPath());
     return paths;
 }
 
 bfs::path VCMIDirsIOS::libraryPath() const { return {ios_frameworksPath()}; }
 bfs::path VCMIDirsIOS::binaryPath() const { return {ios_bundlePath()}; }
-
-bool VCMIDirsIOS::developmentMode() const { return false; }
 #elif defined(VCMI_MAC)
 class VCMIDirsOSX final : public VCMIDirsApple
 {