Don't use a cache file if it equals '<none>' (when --no-cache is used).
This commit is contained in:
parent
8f1729b570
commit
ca0b524628
2 changed files with 3 additions and 2 deletions
3
main.cc
3
main.cc
|
|
@ -414,7 +414,8 @@ appending the output of this command to your Ledger file if you so choose."
|
||||||
// Write out the binary cache, if need be
|
// Write out the binary cache, if need be
|
||||||
|
|
||||||
if (config.use_cache && config.cache_dirty &&
|
if (config.use_cache && config.cache_dirty &&
|
||||||
! config.cache_file.empty()) {
|
! config.cache_file.empty() &&
|
||||||
|
config.cache_file != "<none>") {
|
||||||
TRACE_PUSH(binary_cache, "Writing journal file");
|
TRACE_PUSH(binary_cache, "Writing journal file");
|
||||||
|
|
||||||
std::ofstream stream(config.cache_file.c_str());
|
std::ofstream stream(config.cache_file.c_str());
|
||||||
|
|
|
||||||
|
|
@ -126,7 +126,7 @@ unsigned int parse_ledger_data(config_t& config,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.use_cache && ! config.cache_file.empty() &&
|
if (config.use_cache && ! config.cache_file.empty() &&
|
||||||
! config.data_file.empty()) {
|
config.cache_file != "<none>" && ! config.data_file.empty()) {
|
||||||
DEBUG_PRINT("ledger.config.cache",
|
DEBUG_PRINT("ledger.config.cache",
|
||||||
"using_cache " << config.cache_file);
|
"using_cache " << config.cache_file);
|
||||||
config.cache_dirty = true;
|
config.cache_dirty = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue