Skip to content
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

Allow override libconfig command @include #2881

Merged
merged 1 commit into from
Nov 16, 2020

Conversation

4144
Copy link
Contributor

@4144 4144 commented Oct 24, 2020

Pull Request Prelude

Changes Proposed

Override code try to open first conf/import/include/SERVERNAME/FILEPATH file,
if it failed fallback to normal FILEPATH path.

This feature need for example for override sql_connection.conf
without changing any other configs.

@@ -114,7 +114,17 @@ FILE *scanctx_push_include(struct scan_context *ctx, void *buffer,
strcat(full_file, file);
}

fp = fopen(full_file ? full_file : file, "rt");
if(full_file)
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On same line as previous if pls.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no. this is part of library. and here used non hercules style
i used same style as in lib

3rdparty/libconfig/scanctx.c Show resolved Hide resolved
3rdparty/libconfig/scanctx.c Show resolved Hide resolved
3rdparty/libconfig/scanctx.c Show resolved Hide resolved
@Kenpachi2k13 Kenpachi2k13 added this to the Release v2020.11.16 milestone Oct 29, 2020
@MishimaHaruna MishimaHaruna added the hacktoberfest-accepted Easy-to-tackle issues label Oct 31, 2020
Override code try to open first conf/import/include/SERVERNAME/FILEPATH file,
if it failed fallback to normal FILEPATH path.

This feature need for example for override sql_connection.conf
without changing any other configs.
@MishimaHaruna MishimaHaruna merged commit eb39513 into HerculesWS:master Nov 16, 2020
@4144 4144 deleted the configinclude branch November 26, 2020 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest-accepted Easy-to-tackle issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants