This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Can't write any dot files from vi
- From: luke dot kendall at cisra dot canon dot com dot au
- To: cygwin at cygwin dot com
- Date: Fri, 6 Sep 2002 12:19:12 +1000 (EST)
- Subject: Can't write any dot files from vi
Subject: Re: Can't write .profile from vi
On 6 Sep, I wrote:
> Thanks for the thought, but of course the :w! doesn't work (that was
> the first thing I tried), and as I said, I can write other files in my
> home directory (which is a local directory on the PC, not a network
> share or anything, BTW). I can also do this:
>
> :w xxx
> :q
> cp xxx .profile
Actually, vi won't let me write any existing file whose name starts with
a ".". The error is always "E212: Can't open file for writing"
It only affects existing dot files. And yes, I have write permission
for them all. (I can edit them with vi by writing them to a file ~/xxx
and copying that over the top of the file.)
This is on WindowsXP on a FAT32 file system.
Even stranger, is the fact that I can create new dot files (e.g. .xxx),
and write them. I can then copy an old dotfile over .xxx and write
.xxx; and copy .xxx over .xinitrc. But I still can't write .xinitrc
from inside vi.
What *does* work is this:
cp .xinitrc .xxx
rm .xinitrc
mv .xxx .xinitrc
*Then* I can edit .xinitrc and write it.
The "rm" seemed to have a slightly different noise to other rms; it
sounded like there was a little more disc access, and it took a
fraction of a second longer.
Anyway, I'll wait a couple of days in case anyone would like me to try
some diagnostics. Failing that, I'll just write a script that applies
the above workaround and I'll be happy; though diagnosing the Cygwin
problem may then become impossible.
luke
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/