From 46fa91da57c88a308656c2f7e0d893114f82f691 Mon Sep 17 00:00:00 2001 From: Leo Tenenbaum Date: Thu, 4 Mar 2021 16:39:04 -0500 Subject: fix session on windows --- session.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/session.c b/session.c index ac76511..5a07afb 100644 --- a/session.c +++ b/session.c @@ -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 + } } } -- cgit v1.2.3