This is the mail archive of the
mailing list for the Cygwin project.
Re: Windows 7? Two different versions of a file depending on how it is accessed
- From: Andrew Hancock <andymhancock at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Sun, 26 Jun 2011 11:20:39 -0400
- Subject: Re: Windows 7? Two different versions of a file depending on how it is accessed
- References: <BANLkTikXaaHjWWaivf38Wd=MQso5T3oWSw@mail.gmail.com>
Sorry, this thread has been superseded by "Divergent file system
contents, Cygwin versus Windows 7"
(http://article.gmane.org/gmane.os.cygwin/127335). ?During the thick
of troubleshooting, I lost track of the fact that I posted this
earlier understanding of the problem.
On Sun, Jun 26, 2011 at 10:40 AM, Andrew Hancock <firstname.lastname@example.org> wrote:
> I am seeing two different versions of a file depending on how I access
> it. ?Specifically, the file "C:\Program Files (x86)\Vim\_vimrc" uses
> plain text to provide startup specifications for the text editor gvim.
> ?This is the standalone installation for Windows, not the one the one
> that comes with Cygwin. ?However, that is just the problem context.
> The real issue is that I see two different versions of that file. ?The
> first version is the original one that came with the installation. ?I
> modified it by adding the lines:
> ? set guioptions-=m
> ? set guioptions-=T
> I got a warning that the file is read-only. ?It isn't according
> read-only to "ls -l", but I thought that the discrepancy must have
> been due to Windows 7's more complicated security (which I haven't
> completely figured out). ?I forced the save with "w!", tested it by
> restarting gvim, and found that the settings did not take. ?I wondered
> whether the file actually contained the above two lines that I added.
> It turns out that it depends on how the file is accessed. ?If I access
> the file using notepad or windows-based gvim, the two added lines are
> not present (same thing if I use Windows's "more" from cmd.exe). ?On
> the other hand, if I access the file using vim or less from cygwin's
> bash shell, the two added lines *are* present. ?After googling about
> different versions of files on Windows 7, I found that one possible
> cause might be the backups that the OS makes. ?However, I confirmed
> that this particular file has no backups.
> Right now, I am not sure whether this is a Windows 7 problem or a
> cygwin problem (or more likely, an interaction between them). ?Can
> anyone suggest a next possible course of action? ?I don't want to
> force both copies to be the same by simply editting the file using the
> Windows-base gvim. ?This hides a problem that will doubtlessly come
> back and cause great grief.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple