diff --git a/Sources/PathKit.swift b/Sources/PathKit.swift index 3aa9124..bb32531 100644 --- a/Sources/PathKit.swift +++ b/Sources/PathKit.swift @@ -42,7 +42,7 @@ public struct Path { path = "." } else if components.first == Path.separator && components.count > 1 { let p = components.joined(separator: Path.separator) - path = p.substring(from: p.characters.index(after: p.startIndex)) + path = String (p[p.index(after: p.startIndex)...]) } else { path = components.joined(separator: Path.separator) }