incorrect usage of string.remove in correctPath method

- string remove needs to be given the index before the endIndex or it will crash (#22) needs to be given the index before the endIndex or it will crash
This commit is contained in:
Alek Slater
2016-12-19 18:10:14 +03:30
committed by Amir Abbas Mousavian
parent 0e9a82a288
commit f2d54c7f92
+1 -1
View File
@@ -219,7 +219,7 @@ extension FileProviderBasic {
guard let path = path else { return nil }
var p = path.hasPrefix("/") ? path : "/" + path
if p.hasSuffix("/") {
p.remove(at: p.endIndex)
p.remove(at: p.index(before:p.endIndex))
}
return p
}