GNU bug report logs -
#22795
25.0.91; Can't write read only file on w32
Previous Next
Reported by: "Ota, Takaaki" <Takaaki.Ota <at> am.sony.com>
Date: Wed, 24 Feb 2016 18:18:02 UTC
Severity: normal
Tags: moreinfo
Found in version 25.0.91
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Mon, 29 Feb 2016 09:53:54 -0800 (Pacific Standard Time): "Ota, Takaaki" <Takaaki.Ota <at> am.sony.com> wrote:
> Mon, 29 Feb 2016 19:13:43 +0200: Eli Zaretskii <eliz <at> gnu.org> wrote:
>
> > Finally, what about this part of my questions, did you look into this:
> >
> > > Also, I think by the time this code is run, the original file should
> > > have been renamed to the backup-file name, so the file you are saving
> > > should not exist on disk by the time we open it. If that is not the
> > > case with 25.0.91, then perhaps what fails is not the open call, but
> > > the rename call before that.
> >
> > Does the file that Emacs tries to open here, c:\d\ota\memo, exist when
> > _wopen is called, and if so, is it read-only? Please check this with
> > both versions of Emacs, and see if there's any differences in what
> > happens.
>
> In both cases the original file exists right before calling _wopen()
> but there is a difference. On 25.0.91 the file remains read-only but
> on 24.5 the file is writable right before calling _open(). Now we
> have some clue here.
>
I set a break pointer at write_region() in fileio.c and then perform
the save-buffer command. When emacs breaks at write_region() on 24.5
the file's permission is changed to writable while on 25.0.91 the
permission remains read-only. I will trace in lisp from save-buffer
to write-region on each version to find how this permission difference
is made.
-Tak
This bug report was last modified 8 years and 163 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.