]> git.sesse.net Git - cubemap/blobdiff - stats.cpp
Fix some issues with the last stats.cpp fix.
[cubemap] / stats.cpp
index 4e82d7f3395f206ed0b750d6b72980cf4c796d9a..b2bca75970f800a6cf3f21517e243e3aed89cacd 100644 (file)
--- a/stats.cpp
+++ b/stats.cpp
@@ -77,10 +77,10 @@ void StatsThread::do_work()
                }
                
                if (rename(filename, stats_file.c_str()) == -1) {
+                       log_perror("rename");
                        if (unlink(filename) == -1) {
                                log_perror(filename);
                        }
-                       unlink(filename);
                }
                free(filename);