fix bug with absolute database path on windows#276
Closed
xeash wants to merge 3 commits intogetsentry:masterfrom
Closed
fix bug with absolute database path on windows#276xeash wants to merge 3 commits intogetsentry:masterfrom
xeash wants to merge 3 commits intogetsentry:masterfrom
Conversation
…ir_all didnt skip windows drive letter and failed early
Contributor
|
lgtm. May be related to #266, and I will defer this to @mitsuhiko |
Contributor
|
Thanks for your PR! This was superceded by #289, which seemed like a simpler fix for this. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If you on windows and set
sentry_options_set_database_pathto absolute path , thensentry__path_create_dir_allwill fail horribly, because it dont skip drive letter path component.In my case, I just want to set database to windows temp dir, because I dont have write permissions to program folder.
Interesting note, that I failed to find this bug at first, because I set path with back slashes like
c:/Users/<USERNAME>/AppData/Local/Temp/sentry-db-directory/andsentry__path_create_dir_allwill successfully create folder, but then it callssentry__path_absolutethat normalize it to forward slashesc:\\Users\\<USERNAME>\\AppData\\Local\\Temp\\sentry-db-directory\\and fail onsentry__run_new.If you set forward slashes from start
c:\\Users\\<USERNAME>\\AppData\\Local\\Temp\\sentry-db-directory\\it fails even creatingsentry-db-directoryfor the same reason.This patch fixes described problem for me.