diff options
| author | 2022-09-05 02:59:56 +0100 | |
|---|---|---|
| committer | 2022-09-05 02:59:56 +0100 | |
| commit | 6bdf1ad525d8021f55720ece65bcc0f0a8f1f631 (patch) | |
| tree | 855faf2ee6f49e51395c8659e643807219df0ffc /src/modules/m_permchannels.cpp | |
| parent | Fix unnecessarily using c_str in parameters that take a std::string. (diff) | |
Make the temporary filenames used by modules more unique.
This prevents zombie files from causing problems.
Diffstat (limited to 'src/modules/m_permchannels.cpp')
| -rw-r--r-- | src/modules/m_permchannels.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/modules/m_permchannels.cpp b/src/modules/m_permchannels.cpp index 3f425961e..bec10de0b 100644 --- a/src/modules/m_permchannels.cpp +++ b/src/modules/m_permchannels.cpp @@ -73,7 +73,8 @@ static bool WriteDatabase(PermChannel& permchanmode, Module* mod, bool save_list if (permchannelsconf.empty()) return true; - std::string permchannelsnewconf = permchannelsconf + ".tmp"; + + const std::string permchannelsnewconf = permchannelsconf + ".new." + ConvToStr(ServerInstance->Time()); std::ofstream stream(permchannelsnewconf.c_str()); if (!stream.is_open()) { |
