diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2021-03-04 16:39:04 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2021-03-04 16:39:04 -0500 |
commit | 46fa91da57c88a308656c2f7e0d893114f82f691 (patch) | |
tree | d9eaf2e968b9aa9cab7f3858f4a0e8cfc322bd4a | |
parent | 9521d68bbf1687998a4364ffdf710cb9acad2ba2 (diff) |
fix session on windows
-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 + } } } |