From 4fa09beb836a30f3ac26af7b6b0d01f178b04601 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Tue, 24 Oct 2000 20:57:11 +0000 Subject: [PATCH] (unlock_all_files): Use unlock_file to expand each buffer's file_truename before trying remove its lock file. --- src/ChangeLog | 5 +++++ src/filelock.c | 10 +++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 0dc6d23e0ba..f46f95882ca 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -25,6 +25,11 @@ * .gdbinit (xbacktrace): Handle case that $bt->function isn't a symbol. +2000-10-24 Colin Walters + + * filelock.c (unlock_all_files): Use unlock_file to expand each + buffer's file_truename before trying remove its lock file. + 2000-10-24 Eli Zaretskii * coding.c (decode_coding_emacs_mule): If coding->eol_type is CR diff --git a/src/filelock.c b/src/filelock.c index 4ca356f337f..44db9722f91 100644 --- a/src/filelock.c +++ b/src/filelock.c @@ -1,5 +1,6 @@ /* Lock files for editing. - Copyright (C) 1985, 86, 87, 93, 94, 96, 98, 1999 Free Software Foundation, Inc. + Copyright (C) 1985, 86, 87, 93, 94, 96, 98, 1999, 2000 + Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -660,12 +661,7 @@ unlock_all_files () b = XBUFFER (XCDR (XCAR (tail))); if (STRINGP (b->file_truename) && BUF_SAVE_MODIFF (b) < BUF_MODIFF (b)) { - register char *lfname; - - MAKE_LOCK_NAME (lfname, b->file_truename); - - if (current_lock_owner (0, lfname) == 2) - unlink (lfname); + unlock_file(b->file_truename); } } } -- 2.39.2