diff options
-rw-r--r-- | session.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -177,8 +177,10 @@ static void session_write(Ted *ted) { bool success = !ferror(fp); success &= fclose(fp) == 0; - if (success) + if (success) { + remove(filename2); rename(filename1, filename2); // overwrite old session + } } } |