[ci] more; some fixes I found

This commit is contained in:
Max Howell
2021-05-28 09:35:35 -04:00
parent f9cee2c75f
commit eb33ff8906
8 changed files with 106 additions and 70 deletions

View File

@@ -168,6 +168,7 @@ public extension Pathish {
*/
var parent: Path {
let index = string.lastIndex(of: "/")!
guard index != string.indices.startIndex else { return Path(string: "/") }
let substr = string[string.indices.startIndex..<index]
return Path(string: String(substr))
}