From c476483f87d7eee7af6e441be1b47c9bf498be12 Mon Sep 17 00:00:00 2001 From: dankito Date: Thu, 30 Jul 2020 14:39:58 +0200 Subject: [PATCH] Fixed creating NSURL from folder and filename --- .../src/iosMain/kotlin/net/dankito/utils/multiplatform/File.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/iosMain/kotlin/net/dankito/utils/multiplatform/File.kt b/common/src/iosMain/kotlin/net/dankito/utils/multiplatform/File.kt index f10c2f25..0bc89117 100644 --- a/common/src/iosMain/kotlin/net/dankito/utils/multiplatform/File.kt +++ b/common/src/iosMain/kotlin/net/dankito/utils/multiplatform/File.kt @@ -6,7 +6,7 @@ import platform.Foundation.* actual class File actual constructor(path: String) : NSURL(fileURLWithPath = path) { actual constructor(folder: File, filename: String) - : this(NSURL(string = filename, relativeToURL = folder).absoluteString ?: "") // TODO: or use 'fileURLWithPath'? + : this(folder.URLByAppendingPathComponent(filename)?.path ?: "") actual fun getAbsolutePath(): String {