Skip to content

Commit

Permalink
incorrect usage of string.remove in correctPath method
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
skela authored and amosavian committed Dec 19, 2016
1 parent 0e9a82a commit f2d54c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/FileProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit f2d54c7

Please sign in to comment.