From fcf11feb87fe11291e8d25b44ed61df2f20209f7 Mon Sep 17 00:00:00 2001 From: Davis King Date: Tue, 19 Apr 2016 21:57:59 -0400 Subject: [PATCH] Fixed file I/O error that happens only on windows. --- dlib/dnn/trainer.h | 1 + 1 file changed, 1 insertion(+) diff --git a/dlib/dnn/trainer.h b/dlib/dnn/trainer.h index 673279dd6..8994df0c1 100644 --- a/dlib/dnn/trainer.h +++ b/dlib/dnn/trainer.h @@ -736,6 +736,7 @@ namespace dlib // Now that we know the state is safely saved to disk, delete the old sync // file and move the .tmp file to it. + std::remove(sync_filename.c_str()); std::rename(tempfile.c_str(), sync_filename.c_str()); last_sync_time = std::chrono::system_clock::now();