On Tue, 6 Sep 2011, Tim Chase wrote:
On 09/05/11 12:58, sbq wrote:
Here is my weird experience. I want to modify fzdefaults.xml, a
FileZilla config file located in the Windows 7 directory C:\Program
Files\FileZilla FTP Client. Here's what happened.
[edit file... confirm gVim sees the changes...]
gVim is showing me the wrong contents of the file -- not what is on
the disk.
Once I realized what was going on, I was able to change the file by
starting gVim using "Run as administrator". This time it worked, but
this situation really faked me out.
Why is gVim showing me the wrong contents of the file? That is a
bug, right?
I seem to remember Win7 (and Vista?) doing some sort of
behind-the-scenes remapping of files so that if you tried to edit
something in a protected area like "\Program Files", it would redirect
the reads/writes into some user-space area. My google-fu is
apparently broken as I don't seem to be able to turn up anything of
the like to corroborate this, but I suspect this is an artifact of
Win7 trying to prevent you from touching files it "shouldn't". To
edit files in protected areas, you need to run as admin. So Vim is
likely editing a file that (to the OS) exists in something like like
"%USER%\Application Data\FileZilla..." but to Vim looks like it's in
"\Program Files"; and then when FileZilla starts up, it's not looking
in the same/redirected place.
Yes. I think that's what's happening. I posted some links recently in
vim_use¹ when something similar occurred, though the issue there was
different. The links are probably more relevant here. The first has a
good explanation. The second is a good reference.
Windows 7 folder mapping:
http://answers.microsoft.com/en-us/windows/forum/windows_7-files/windows-7-folder-mapping/080a50fe-7581-46d1-a85d-126f24604309
Application Compatibility: Junction Points and Backup Applications:
http://msdn.microsoft.com/en-us/library/bb756982.aspx
--
Best,
Ben
¹: https://groups.google.com/forum/#!msg/vim_use/RRH6ZB3Nx8I/w9tnDnT_cUMJ
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php