bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#49261: 28.0.50; File Locking Breaks Presumptuous Toolchains


From: Lars Ingebrigtsen
Subject: bug#49261: 28.0.50; File Locking Breaks Presumptuous Toolchains
Date: Wed, 07 Jul 2021 20:08:48 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

While looking at this code, I'm puzzled by:

-  orig_fn = fn;
-  fn = Fexpand_file_name (fn, Qnil);
-#ifdef WINDOWSNT
-  /* Ensure we have only '/' separators, to avoid problems with
-     looking (inside fill_in_lock_file_name) for backslashes in file
-     names encoded by some DBCS codepage.  */
-  dostounix_filename (SSDATA (fn));
-#endif
-  encoded_fn = ENCODE_FILE (fn);
-  if (create_lockfiles)
-    /* Create the name of the lock-file for file fn */
-    MAKE_LOCK_NAME (lfname, encoded_fn);
-

So here we (possibly destructively) alter the data in the fn string on
WINDOWSNT, because we want to avoid problems in fill_in_lock_file_name.
OK, but we call MAKE_LOCK_NAME (which calls fill_in_lock_file_name) in
two other places, and in those places the call isn't guarded by a call
to dostounix_filename.

This is moot after my patch, since MAKE_LOCK_NAME is gone, but I'm still
worried that there's something I don't understand here...  The
dostounix_filename call was added by Eli in 2013.

So I think I'll wait to push this patch until Eli has given it a
once-over.  I've included the current state of the patch below as an
attachment.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no

Attachment: lock.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]