hackjutsu / Lepton

💻 Democratizing Snippet Management (macOS/Win/Linux)
https://hackjutsu.com/Lepton
MIT License
10.13k stars 475 forks source link

Fix: using path.join instead of concatenate path strings directly. #474

Closed PMExtra closed 3 years ago

PMExtra commented 3 years ago

Although Windows API support both forward slash and backslash. But in common sense, Windows should use forward slash as path separator, especially cmd and other command shells usually doesn't support backslash. So the most robust solution is follow the os specified path separator, we can use path.join to implement it.

The most important is that, Lepton has shown the config path in UI (About dialog). For now, it shown mixed path separators in one path, it makes user confused. So I fixed it.

Expected (after this fix):

expect

Actual (before this fix):

actual
hackjutsu commented 3 years ago

That's pretty cool. Thanks for making the change!

hackjutsu commented 3 years ago

@all-contributors please add @PMExtra for code

allcontributors[bot] commented 3 years ago

@hackjutsu

I've put up a pull request to add @PMExtra! :tada: