Subject: Re: bug#10257: 23.3.1 Cygwin: network drives - file is write protected (false positive)

From: Ken Brown <[email-masked]>
Date: Wed, 14 Dec 2011 07:24:48 -0500

On 12/14/2011 3:35 AM, Eli Zaretskii wrote:
>> From: Jari Aalto<[email-masked]>
>> Cc: Stefan Monnier<[email-masked]>,  Eli Zaretskii<[email-masked]>,  [email-masked],  jari<[email-masked]>
>> Date: Wed, 14 Dec 2011 10:01:47 +0200
>>
>> I'm proposing following,
>> Jari
>>
>> 2011-12-14  Jari Aalto<[email-masked]>
>>
>>          * files.el (basic-save-buffer-2): Add
>>          `save-buffer-read-only-confirm-flag' to control asking to a
>>          write-protected file.
>>          (save-buffer-read-only-confirm-flag): New user variable
>>          (bug#10257).
>
> Yuck!  Are we going to add a knob for every possible misconfiguration
> of network filesystems and/or for every incompatibility in Posix
> emulation layers on Windows?
>
> Up till now, the way to deal with this was either to change the
> generic code (where it was deemed to be deficient in the first place),
> or ask the maintainers of the platform to fix that either in the
> platform libraries or in platform-specific code in Emacs.  I think
> that is the right way; adding a user option every time is not, IMNSHO.
>
> If native Windows and even MS-DOS ports can DTRT with this, then how
> come Cygwin cannot?

The MS-DOS port uses system-specific code in `check_writable' (see 
fileio.c).  I don't know whether the native Windows port DTRT for Jari's 
network filesystem.  Jari, can you test this?

Ken