Skip to content

Commit c92631f

Browse files
authored
(138602480) Fix typo in String.replacingTildeWithRealHomeDirectory (#1007)
1 parent d14ef7e commit c92631f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/FoundationEssentials/FileManager/SearchPaths/FileManager+DarwinSearchPaths.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,10 @@ extension String {
162162
}
163163
let euid = geteuid()
164164
let trueUid = euid == 0 ? getuid() : euid
165-
guard let name = Platform.name(forUID: trueUid) else {
165+
guard let home = Platform.homeDirectory(forUID: trueUid) else {
166166
return self
167167
}
168-
return name.appendingPathComponent(String(self.dropFirst()))
168+
return home.appendingPathComponent(String(self.dropFirst()))
169169
}
170170
}
171171
#endif // os(macOS) && FOUNDATION_FRAMEWORK

0 commit comments

Comments
 (0)