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

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

bug#66546: 30.0.50; save-buffer to write-protected file without backup f


From: Jens Schmidt
Subject: bug#66546: 30.0.50; save-buffer to write-protected file without backup fails
Date: Sat, 21 Oct 2023 22:17:18 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Jens Schmidt <jschmidt4gnu@vodafonemail.de>
>> Cc: 66546@debbugs.gnu.org
>> Date: Sat, 21 Oct 2023 19:56:44 +0200

>> I wanted to make 100% sure that we execute that first cond-branch if and
>> only if we previously changed the file mode.  IOW, I feel I cannot
>> exclude that by some strange configuration
>> 
>>   (equal buffer-file-name (nth 2 setmodes))
>> 
>> could also be true in other cases.
>
> It doesn't matter which cases could cause this.  What matters is that
> only when these two are identical that we need to make sure the file
> ends up read-only as it was before the call to set-file-modes.

Makes sense, will do.  In that case, would a plain `equal' be enough to
compare file paths?





reply via email to

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