diff options
| -rw-r--r-- | src/filelock.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/filelock.c b/src/filelock.c index b5dce88639f..81edb567ad9 100644 --- a/src/filelock.c +++ b/src/filelock.c | |||
| @@ -41,6 +41,8 @@ Boston, MA 02111-1307, USA. */ | |||
| 41 | 41 | ||
| 42 | #include "lisp.h" | 42 | #include "lisp.h" |
| 43 | #include "buffer.h" | 43 | #include "buffer.h" |
| 44 | #include "charset.h" | ||
| 45 | #include "coding.h" | ||
| 44 | 46 | ||
| 45 | #include <time.h> | 47 | #include <time.h> |
| 46 | #include <errno.h> | 48 | #include <errno.h> |
| @@ -370,15 +372,16 @@ void | |||
| 370 | lock_file (fn) | 372 | lock_file (fn) |
| 371 | Lisp_Object fn; | 373 | Lisp_Object fn; |
| 372 | { | 374 | { |
| 373 | register Lisp_Object attack, orig_fn; | 375 | register Lisp_Object attack, orig_fn, encoded_fn; |
| 374 | register char *lfname, *locker; | 376 | register char *lfname, *locker; |
| 375 | lock_info_type lock_info; | 377 | lock_info_type lock_info; |
| 376 | 378 | ||
| 377 | orig_fn = fn; | 379 | orig_fn = fn; |
| 378 | fn = Fexpand_file_name (fn, Qnil); | 380 | fn = Fexpand_file_name (fn, Qnil); |
| 381 | encoded_fn = ENCODE_FILE (fn); | ||
| 379 | 382 | ||
| 380 | /* Create the name of the lock-file for file fn */ | 383 | /* Create the name of the lock-file for file fn */ |
| 381 | MAKE_LOCK_NAME (lfname, fn); | 384 | MAKE_LOCK_NAME (lfname, encoded_fn); |
| 382 | 385 | ||
| 383 | /* See if this file is visited and has changed on disk since it was | 386 | /* See if this file is visited and has changed on disk since it was |
| 384 | visited. */ | 387 | visited. */ |