diff --git a/macos/Sources/Helpers/Extensions/URL+Extension.swift b/macos/Sources/Helpers/Extensions/URL+Extension.swift index e3554b599..1a87cc028 100644 --- a/macos/Sources/Helpers/Extensions/URL+Extension.swift +++ b/macos/Sources/Helpers/Extensions/URL+Extension.swift @@ -3,10 +3,6 @@ import Foundation extension URL { /// The decoded path with trailing separators removed, except for the root path. var pathWithoutTrailingSlash: String { - var result = path(percentEncoded: false) - while result.count > 1 && result.hasSuffix("/") { - result.removeLast() - } - return result + FilePath(path(percentEncoded: false)).string } }