summaryrefslogtreecommitdiff
path: root/buffer.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-01-08 18:48:39 -0500
committerpommicket <pommicket@gmail.com>2023-01-09 13:24:08 -0500
commitc7e80603848df006dc2a3b341063bec1b35ba811 (patch)
tree1624ca42731a856a0d499a339b971ec1cef3b2e0 /buffer.c
parent1051788217ead36b554efe38259dfd257e851fc2 (diff)
start windows fix
Diffstat (limited to 'buffer.c')
-rw-r--r--buffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/buffer.c b/buffer.c
index c2f16b8..607f250 100644
--- a/buffer.c
+++ b/buffer.c
@@ -2459,7 +2459,7 @@ bool buffer_save(TextBuffer *buffer) {
success = false;
}
if (success) {
- if (rename(tmp_path, buffer->path) != 0) {
+ if (os_rename_overwrite(tmp_path, buffer->path) < 0) {
if (!buffer_has_error(buffer))
buffer_error(buffer, "Couldn't rename %s => %s.", tmp_path, buffer->path);
success = false;