mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-09-14 18:01:58 +00:00
Update macos/Sources/Helpers/Extensions/URL+Extension.swift
Co-authored-by: Lukas <134181853+bo2themax@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
2de1596115
commit
07abbd1e7e
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user