We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cf2cc0e commit 886da1dCopy full SHA for 886da1d
Sources/PerfectLib/File.swift
@@ -99,7 +99,7 @@ public class File {
99
}
100
101
static func resolveTilde(inPath: String) -> String {
102
- if inPath[inPath.startIndex] == "~" {
+ if !inPath.isEmpty && inPath[inPath.startIndex] == "~" {
103
var wexp = wordexp_t()
104
wordexp(inPath, &wexp, 0)
105
if let resolved = wexp.we_wordv[0], pth = String(validatingUTF8: resolved) {
0 commit comments