fix windows fs::path

This commit is contained in:
xensik 2022-03-18 11:42:44 +01:00
parent b8b929d95a
commit f3bc6eed46
2 changed files with 7 additions and 7 deletions

View File

@ -152,7 +152,7 @@ auto resolver::fs_to_game_path(const std::filesystem::path& file) -> std::filesy
} }
else if (paths.contains(result.string())) else if (paths.contains(result.string()))
{ {
result /= entry; result += "/"s + entry.string();
} }
} }

View File

@ -446,7 +446,7 @@ void assemble_file(game game, const std::filesystem::path& file)
assembler.assemble(next.string(), data); assembler.assemble(next.string(), data);
utils::file::save((std::filesystem::path("assembled/t6") / next).string(), assembler.output()); utils::file::save((std::filesystem::path("assembled/t6") / next).generic_string(), assembler.output());
std::cout << "assembled " << path.replace_extension() << "\n"; std::cout << "assembled " << path.replace_extension() << "\n";
} }
catch (const std::exception& e) catch (const std::exception& e)
@ -467,7 +467,7 @@ void disassemble_file(game game, const std::filesystem::path& file)
disassembler.disassemble(file.string(), data); disassembler.disassemble(file.string(), data);
utils::file::save((std::filesystem::path("disassembled/t6") / next).string(), disassembler.output_raw()); utils::file::save((std::filesystem::path("disassembled/t6") / next).generic_string(), disassembler.output_raw());
std::cout << "disassembled " << path.replace_extension() << "\n"; std::cout << "disassembled " << path.replace_extension() << "\n";
} }
catch (const std::exception& e) catch (const std::exception& e)
@ -492,7 +492,7 @@ void compile_file(game game, const std::filesystem::path& file)
assembler.assemble(path.string(), assembly); assembler.assemble(path.string(), assembly);
utils::file::save((std::filesystem::path("compiled/t6") / path).string(), assembler.output()); utils::file::save((std::filesystem::path("compiled/t6") / path).generic_string(), assembler.output());
std::cout << "compiled " << path.replace_extension() << "\n"; std::cout << "compiled " << path.replace_extension() << "\n";
} }
catch (const std::exception& e) catch (const std::exception& e)
@ -517,7 +517,7 @@ void decompile_file(game game, const std::filesystem::path& file)
decompiler.decompile(file.string(), output); decompiler.decompile(file.string(), output);
utils::file::save((std::filesystem::path("decompiled/t6") / path).string(), decompiler.output()); utils::file::save((std::filesystem::path("decompiled/t6") / path).generic_string(), decompiler.output());
std::cout << "decompiled " << path.replace_extension() << "\n"; std::cout << "decompiled " << path.replace_extension() << "\n";
} }
catch (const std::exception& e) catch (const std::exception& e)
@ -548,9 +548,9 @@ void execute(mode mode, game game, const std::string& path)
if (entry.is_regular_file()) if (entry.is_regular_file())
{ {
if (game < game::T6) if (game < game::T6)
gsc::funcs[mode](game, entry.path().string()); gsc::funcs[mode](game, entry.path().generic_string());
else else
arc::funcs[mode](game, std::filesystem::path(entry.path(), std::filesystem::path::format::generic_format)); arc::funcs[mode](game, std::filesystem::path(entry.path().generic_string(), std::filesystem::path::format::generic_format));
} }
} }
} }