- [FIX] En Windows no se reemplaçaven correctament les barres
This commit is contained in:
+2
-1
@@ -1,3 +1,4 @@
|
|||||||
lagueirto
|
lagueirto
|
||||||
.vscode/*
|
.vscode/*
|
||||||
lagueirto.exe
|
*.exe
|
||||||
|
*.zip
|
||||||
@@ -23,9 +23,9 @@ std::vector<std::string> source_paths;
|
|||||||
std::string build_path = "";
|
std::string build_path = "";
|
||||||
std::string compiler = "g++";
|
std::string compiler = "g++";
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
std::string folder_char = "\\";
|
char folder_char = '\\';
|
||||||
#else
|
#else
|
||||||
std::string folder_char = "/";
|
char folder_char = '/';
|
||||||
#endif
|
#endif
|
||||||
std::string loaded_section = "";
|
std::string loaded_section = "";
|
||||||
|
|
||||||
@@ -324,7 +324,7 @@ std::string generate_object_file_name(std::string filename) {
|
|||||||
std::filesystem::path cwd = std::filesystem::weakly_canonical(std::filesystem::current_path());
|
std::filesystem::path cwd = std::filesystem::weakly_canonical(std::filesystem::current_path());
|
||||||
std::filesystem::path target = std::filesystem::weakly_canonical(filename);
|
std::filesystem::path target = std::filesystem::weakly_canonical(filename);
|
||||||
std::string out = std::filesystem::relative(target, cwd).replace_extension("o").generic_string();
|
std::string out = std::filesystem::relative(target, cwd).replace_extension("o").generic_string();
|
||||||
for (char& c : out) if (c == folder_char[0]) c = '.';
|
for (char& c : out) if (c == '/') c = '.';
|
||||||
return build_path + folder_char + out;
|
return build_path + folder_char + out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user