-
Notifications
You must be signed in to change notification settings - Fork 535
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
Add check for absolute path of config file #1276
Merged
mooskagh
merged 15 commits into
LeelaChessZero:master
from
KipHamiltons:specify_absolute_path_to_config
May 28, 2020
Merged
Changes from 11 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
5109e94
Add check for absolute path of config file
youngest-person-alive 6743db9
Added check for windows systems.
youngest-person-alive 104408e
Changed to using C++17's filepath checker - DOES NOT BUILD
youngest-person-alive 0f01c91
Moved the file conversion to utils/filesystem
youngest-person-alive bbc9a02
Added includ for windows API file
youngest-person-alive b0360c7
fixed windows API call hopefully
youngest-person-alive b14a0c0
Typecast string to LPCSTR for win API call
youngest-person-alive 062fbab
Removed previous solution
youngest-person-alive 0c54367
Use the path given, but default to lc0.config in binary directory.
youngest-person-alive 95b081b
Cleaned up includes
youngest-person-alive 65c23b2
Removed extra line
youngest-person-alive ea7e4b8
Changed default file parameter
youngest-person-alive d9adf7e
Changed filename const-ness
youngest-person-alive a603ec1
Fixed default filename
youngest-person-alive 8fc4bba
Added const default filename.
youngest-person-alive File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
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.
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 think it's better to have a separate value for default behaviour, like "
<default>
" or "<auto>
" (which still will read$LC0_DIRECTORY/lc0.config
), similarly to what we have for weights file (there we have "<autodiscover>
").Otherwise when run like
./lc0 -c lc0.cfg
it will search in the current directory, while for./lc0 -c lc0.config
it will search in the directory of the binary, which is a confusing inconsistency.Also in future we'll try several locations by default (possibly with different file names, not only directories, e.g.
/etc/lc0.cfg
vs~/.lc0rc
), and it's more logical if the parameter doesn't have file name in it.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 have made changes along these lines. Let me know if this is what you were thinking 🙂