-
Notifications
You must be signed in to change notification settings - Fork 38.7k
util: if DataDir is a symbolic link, manually follow it
#24267
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
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
| if (!fs::is_directory(path)) { | ||
| path = ""; | ||
| return path; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What scenarios these lines are required in?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A symbolic link may exist but point to a non existing location. For example, if your symbolic link point to an external hard drive, but it is not mounted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
I've tested the following scenarios. I run
bitcoind: fs.cpp:39: fs::path fsbridge::AbsPathJoin(const fs::path&, const fs::path&): Assertion `base.is_absolute()' failed.
Aborted (core dumped)
|
DataDir is a symbolic link, manually follow it
If there are behavior changes comparing to pre-20744 variant, could describe them in the PR description? |
This is the only behavior change I've noticed from the previously mentioned scenario between master@04255073bbd2b8ea71ae8a9ff7433be499312758 (before #20744 was merged) and my pull request. It looks like even though
|
FWIW, #24266 preserves the pre-20744 behavior, and for a broken link |
Closing this PR as #24266 provides a better fix. Thank you for your time hebasto 👍🏻 |

Fixes #24257
Another related fix attempt can be found here #24266