diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:24:09 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:24:09 +0200 |
commit | 110fc5dee14fc7988f631a158e50d283446aba7a (patch) | |
tree | 7c19dfd3bdb8c4636409ec80a38c70499ac006db /lib/generate_logfile.h | |
parent | 5.14 (diff) | |
download | FreeFileSync-110fc5dee14fc7988f631a158e50d283446aba7a.tar.gz FreeFileSync-110fc5dee14fc7988f631a158e50d283446aba7a.tar.bz2 FreeFileSync-110fc5dee14fc7988f631a158e50d283446aba7a.zip |
5.15
Diffstat (limited to 'lib/generate_logfile.h')
-rw-r--r-- | lib/generate_logfile.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/generate_logfile.h b/lib/generate_logfile.h index 875d5b98..c441de66 100644 --- a/lib/generate_logfile.h +++ b/lib/generate_logfile.h @@ -119,7 +119,6 @@ inline void saveToLastSyncsLog(const SummaryInfo& summary, //throw FileError const ErrorLog& log, size_t maxBytesToWrite) //log may be *huge*, e.g. 1 million items; LastSyncs.log *must not* create performance problems! - { const Zstring filename = getConfigDir() + Zstr("LastSyncs.log"); @@ -127,7 +126,7 @@ void saveToLastSyncsLog(const SummaryInfo& summary, //throw FileError replace(newStream, '\n', LINE_BREAK); //don't replace line break any earlier newStream += LINE_BREAK; - //write log items one after the other instead of creating one big string: memory allocation might fail; think 1 million entries! + //check size of "newStream": memory allocation might fail - think 1 million entries! for (auto iter = log.begin(); iter != log.end(); ++iter) { newStream += replaceCpy(utfCvrtTo<Utf8String>(formatMessage<std::wstring>(*iter)), '\n', LINE_BREAK); |