Fix inconsistencies found by consistency audit of 4e20fe8

This commit is contained in:
Ian Gulliver
2026-10-23 11:12:34 -07:00
parent 46039ae757
commit 69848a2c6e
4 changed files with 10 additions and 6 deletions
+6 -2
View File
@@ -393,11 +393,15 @@ func chromeFromProfile() async -> Chrome? {
}
func openChrome() async throws -> (Chrome, String) {
if let chrome = await chromeFromProfile() { return (chrome, "") }
if let chrome = await chromeFromProfile() {
return (chrome, "")
}
let lock = try await lockInput()
defer { close(lock) }
// Another helper may have started Chrome while this one waited.
if let chrome = await chromeFromProfile() { return (chrome, "") }
if let chrome = await chromeFromProfile() {
return (chrome, "")
}
let fm = FileManager.default
try fm.createDirectory(atPath: chromeProfile, withIntermediateDirectories: true, attributes: [.posixPermissions: 0o700])
try fm.setAttributes([.posixPermissions: 0o700], ofItemAtPath: chromeProfile)