comparison src/filelock.c @ 12811:11f5ce737c57

(lock_file): Use get_truename_buffer.
author Richard M. Stallman <rms@gnu.org>
date Wed, 09 Aug 1995 22:39:32 +0000
parents 10197e4b3fb2
children 21a86b6274e6
comparison
equal deleted inserted replaced
12810:bd486675e103 12811:11f5ce737c57
197 197
198 void 198 void
199 lock_file (fn) 199 lock_file (fn)
200 register Lisp_Object fn; 200 register Lisp_Object fn;
201 { 201 {
202 register Lisp_Object attack; 202 register Lisp_Object attack, orig_fn;
203 register char *lfname; 203 register char *lfname;
204 204
205 orig_fn = fn;
205 fn = Fexpand_file_name (fn, Qnil); 206 fn = Fexpand_file_name (fn, Qnil);
206 207
207 MAKE_LOCK_NAME (lfname, fn); 208 MAKE_LOCK_NAME (lfname, fn);
208 209
209 /* See if this file is visited and has changed on disk since it was 210 /* See if this file is visited and has changed on disk since it was
210 visited. */ 211 visited. */
211 { 212 {
212 register Lisp_Object subject_buf; 213 register Lisp_Object subject_buf;
213 subject_buf = Fget_file_buffer (fn); 214 subject_buf = get_truename_buffer (orig_fn);
214 if (!NILP (subject_buf) 215 if (!NILP (subject_buf)
215 && NILP (Fverify_visited_file_modtime (subject_buf)) 216 && NILP (Fverify_visited_file_modtime (subject_buf))
216 && !NILP (Ffile_exists_p (fn))) 217 && !NILP (Ffile_exists_p (fn)))
217 call1 (intern ("ask-user-about-supersession-threat"), fn); 218 call1 (intern ("ask-user-about-supersession-threat"), fn);
218 } 219 }