-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change sqlite DB path default to data directory #6198
Conversation
Signed-off-by: jolheiser <john.olheiser@gmail.com>
Codecov Report
@@ Coverage Diff @@
## master #6198 +/- ##
=========================================
Coverage ? 38.86%
=========================================
Files ? 354
Lines ? 50192
Branches ? 0
=========================================
Hits ? 19508
Misses ? 27859
Partials ? 2825
Continue to review full report at Codecov.
|
And why not |
I was unaware there were two different common join methods. Go has a few of these interesting "features" I've noticed. After reading the docs and differences, filepath probably makes more sense here, though throughout the code I see both methods being used somewhat interchangeably. Would you prefer I change it to filepath? |
@lunny @techknowlogick I doubt it would change your review, but just an FYI that I changed |
FWIW, I did some research into path vs. filepath in go, and how it impacts paths in Windows. Turns out it is not that much of a problem in most cases: There are a few additional notes in the pull request that fixed that issue if you are interested in all the gory details. |
Thanks for the info! That's more or less what I read when looking in to it as well. As Go explains it:
|
Thanks for making this change 😃 |
It is true that filepath is preferable. But I found in my testing that Go is very forgiving with the slashes, so you can mix and match slashes as you wish and Go will "do the right thing" in most cases on any operating systems. In other words you can actually be pretty lazy about using path instead of filepath and get away with it in almost all cases. The fly in the ointment that I found was UNC paths (i.e. Windows files share paths like: But fundamentally everyone is right in saying that filepath should be used for paths to the filesystem. I was just trying to provide context around why it still (mostly) works if you don't. |
As titled, split from #6176