mirror of
https://github.com/atom/atom.git
synced 2026-01-25 23:08:18 -05:00
Only catch an expected EEXIST error
This commit is contained in:
@@ -864,9 +864,10 @@ class Config
|
||||
fs.makeTreeSync(path.dirname(@configFilePath))
|
||||
CSON.writeFileSync(@configFilePath, {}, {flag: 'wx'}) # fails if file exists
|
||||
catch error
|
||||
@configFileHasErrors = true
|
||||
@notifyFailure("Failed to initialize `#{path.basename(@configFilePath)}`", error.stack)
|
||||
return
|
||||
if error.code isnt 'EEXIST'
|
||||
@configFileHasErrors = true
|
||||
@notifyFailure("Failed to initialize `#{path.basename(@configFilePath)}`", error.stack)
|
||||
return
|
||||
|
||||
try
|
||||
unless @savePending
|
||||
|
||||
Reference in New Issue
Block a user