- [FIX] En Windows no se reemplaçaven correctament les barres
This commit is contained in:
+2
-1
@@ -1,3 +1,4 @@
|
||||
lagueirto
|
||||
.vscode/*
|
||||
lagueirto.exe
|
||||
*.exe
|
||||
*.zip
|
||||
@@ -23,9 +23,9 @@ std::vector<std::string> source_paths;
|
||||
std::string build_path = "";
|
||||
std::string compiler = "g++";
|
||||
#ifdef _WIN32
|
||||
std::string folder_char = "\\";
|
||||
char folder_char = '\\';
|
||||
#else
|
||||
std::string folder_char = "/";
|
||||
char folder_char = '/';
|
||||
#endif
|
||||
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 target = std::filesystem::weakly_canonical(filename);
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user