diff --git a/Sources/arm/io/ImportArm.hx b/Sources/arm/io/ImportArm.hx index 506459c2..d0c7c766 100644 --- a/Sources/arm/io/ImportArm.hx +++ b/Sources/arm/io/ImportArm.hx @@ -120,8 +120,7 @@ class ImportArm { for (file in project.assets) { // Convert image path from relative to absolute - var isAbsolute = file.charAt(0) == "/" || file.charAt(1) == ":"; - var abs = isAbsolute ? file : base + file; + var abs = Data.isAbsolute(file) ? file : base + file; if (!File.exists(abs)) { makePink(abs); } @@ -168,8 +167,7 @@ class ImportArm { if (project.mesh_assets != null && project.mesh_assets.length > 0) { var file = project.mesh_assets[0]; - var isAbsolute = file.charAt(0) == "/" || file.charAt(1) == ":"; - var abs = isAbsolute ? file : base + file; + var abs = Data.isAbsolute(file) ? file : base + file; Project.meshAssets = [abs]; } @@ -273,8 +271,7 @@ class ImportArm { var base = Path.baseDir(path); for (file in project.assets) { // Convert image path from relative to absolute - var isAbsolute = file.charAt(0) == "/" || file.charAt(1) == ":"; - var abs = isAbsolute ? file : base + file; + var abs = Data.isAbsolute(file) ? file : base + file; if (!File.exists(abs)) { makePink(abs); } diff --git a/Sources/arm/ui/UIFiles.hx b/Sources/arm/ui/UIFiles.hx index b9d94254..7ecf9949 100644 --- a/Sources/arm/ui/UIFiles.hx +++ b/Sources/arm/ui/UIFiles.hx @@ -25,7 +25,7 @@ class UIFiles { path = isSave ? Krom.saveDialog(filters, "") : Krom.openDialog(filters, ""); if (path != null) { - path = path.replace("\\\\", "\\"); + if (path.charAt(1) == ":") path = path.replace("\\\\", "\\"); path = path.replace("\r", ""); filename = path.substr(path.lastIndexOf(Path.sep) + 1); if (isSave) path = path.substr(0, path.lastIndexOf(Path.sep));