Normalize separators on project import

This commit is contained in:
luboslenco
2020-02-17 15:29:10 +01:00
parent 098fd86292
commit 62117ebce1
+10
View File
@@ -112,6 +112,11 @@ class ImportArm {
var base = Path.baseDir(path);
for (file in project.assets) {
#if krom_windows
file = file.replace("/", "\\");
#else
file = file.replace("\\", "/");
#end
// Convert image path from relative to absolute
var abs = Data.isAbsolute(file) ? file : base + file;
if (!File.exists(abs)) {
@@ -270,6 +275,11 @@ class ImportArm {
public static function runMaterialFromProject(project: TProjectFormat, path: String) {
var base = Path.baseDir(path);
for (file in project.assets) {
#if krom_windows
file = file.replace("/", "\\");
#else
file = file.replace("\\", "/");
#end
// Convert image path from relative to absolute
var abs = Data.isAbsolute(file) ? file : base + file;
if (!File.exists(abs)) {