diff options
author | Bram Moolenaar <Bram@vim.org> | 2005-11-28 22:58:23 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2005-11-28 22:58:23 +0000 |
commit | 9835862c81a196afd0d5e23974f8e600aa661ffd (patch) | |
tree | 7ac193b620417a98e66b91fedc722551a23345b3 /src | |
parent | a39571032cbfab60c8e49829bbd40734b7c86e92 (diff) |
updated for version 7.0161
Diffstat (limited to 'src')
-rw-r--r-- | src/fileio.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/fileio.c b/src/fileio.c index a3ceb4b5d8..302e93a517 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -3150,8 +3150,10 @@ buf_write(buf, fname, sfname, start, end, eap, append, forceit, || st.st_mode != perm) backup_copy = TRUE; # endif - mch_remove(IObuff); + /* Close the file before removing it, on MS-Windows we + * can't delete an open file. */ close(fd); + mch_remove(IObuff); } } } |