diff --git a/src/patch.cpp b/src/patch.cpp index fc0eda6a..69840655 100644 --- a/src/patch.cpp +++ b/src/patch.cpp @@ -91,6 +91,7 @@ void PatchManager::save(std::string path) { json_dumpf(rootJ, file, JSON_INDENT(2) | JSON_REAL_PRECISION(9)); std::fclose(file); + std::remove(path.c_str()); std::rename(tmpPath.c_str(), path.c_str()); }