fix: 再次修复路径错误

This commit is contained in:
MistEO
2022-11-18 20:01:42 +08:00
parent 62817d8369
commit 35eb427a83
3 changed files with 5 additions and 4 deletions

View File

@@ -51,7 +51,8 @@ bool AsstLoadResource(const char* path)
if (auto& user_dir = asst::UserDir::get_instance(); user_dir.empty()) {
user_dir.set(path);
}
inited = asst::ResourceLoader::get_instance().load(asst::utils::path(path) / asst::utils::path("resource"));
using namespace asst::utils::path_literals;
inited = asst::ResourceLoader::get_instance().load(asst::utils::path(path) / "resource"_p);
return inited;
}

View File

@@ -1406,7 +1406,8 @@ bool asst::Controller::connect(const std::string& adb_path, const std::string& a
return utils::string_replace_all(
cmd_replace(cfg_cmd),
{
{ "[minitouchLocalPath]", (m_resource_path / "minitouch"_p / optimal_abi / "minitouch"_p).u8string() },
{ "[minitouchLocalPath]",
utils::path_to_utf8_string(m_resource_path / "minitouch"_p / optimal_abi / "minitouch"_p) },
{ "[minitouchWorkingFile]", m_uuid },
});
};

View File

@@ -22,8 +22,6 @@
bool asst::ResourceLoader::load(const std::filesystem::path& path)
{
using namespace asst::utils::path_literals;
#define LoadResourceAndCheckRet(Configer, Filename) \
{ \
LogTraceScope(std::string("LoadResourceAndCheckRet ") + #Configer); \
@@ -48,6 +46,7 @@ bool asst::ResourceLoader::load(const std::filesystem::path& path)
}
LogTraceFunction;
using namespace asst::utils::path_literals;
/* load resource with json files*/
LoadResourceAndCheckRet(GeneralConfiger, "config.json"_p);