xi-editor / xi-mac

The xi-editor mac frontend.
Apache License 2.0
3.02k stars 147 forks source link

Copies default config file when none found #471

Closed nangtrongvuon closed 4 years ago

nangtrongvuon commented 5 years ago

Previously xi-mac only copied the base config file on startup - this commit makes it also copies the base config when the user opens the preference folder and no config is found.

closes #375

Review Checklist

cmyr commented 5 years ago

hmm, this is confusing to me. What's the scenario where we open the preference folder and no config is found? Why wasn't it copied on startup? Is this like if the user manually deletes it?

nangtrongvuon commented 5 years ago

@cmyr Yeah, pretty much. We only create preferences.xiconfig on first run at the moment, when the Application Support folder for Xi hasn't existed yet. If the user deletes that config file (or it disappears for some reason), it causes what is described in #375.

nangtrongvuon commented 5 years ago

@cmyr Sorry, I've been a bit occupied with some stuff along with not feeling too well in general, gonna get to this sometime this week!

nangtrongvuon commented 5 years ago

@cmyr Got to updating this PR today with your suggestions, does it look okay now?

Also, is it me or is CI hidden?

nangtrongvuon commented 4 years ago

@cmyr Thanks for the review! Was a tiny little bit hasty and tired when I was writing this a few weeks earlier, but I fixed it up with your feedback. Does it look good now?