Skip to content

Commit

Permalink
Modified condition to create default sample shadow directory (#469)
Browse files Browse the repository at this point in the history
Co-authored-by: Ubuntu <[email protected]>
  • Loading branch information
ig15 and Ubuntu authored Oct 21, 2024
1 parent faf8033 commit 5284d04
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions source/config/Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1773,12 +1773,13 @@ bool PlainConfig::SampleShadow::LoadFromCliArgs(const CliArgs &cliArgs)
.c_str();
}

// setting `shadowOutputFile` value to default if no value was passed by user via CLI or JSON config.
if ((!shadowOutputFile.has_value() || shadowOutputFile->empty()) && !createShadowOutputFile())
// setting `shadowOutputFile` value to default if no value was passed by user via CLI or JSON config, provided sample shadow feature is enabled.
if (enabled && ((!shadowOutputFile.has_value() || shadowOutputFile->empty()) && !createShadowOutputFile()))
{
return false;
}

LOGM_INFO(Config::TAG, "Not creating directory %s since sample shadow is disabled", Config::DEFAULT_SAMPLE_SHADOW_OUTPUT_DIR);
return true;
}

Expand Down

0 comments on commit 5284d04

Please sign in to comment.