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...]

[I trimmed too much, probably. An important bit: "Right click » edit with Vim"]


gVim is showing me the wrong contents of the file -- not what is on the disk.

What kind of gVim are you using?  And where did you get it?

I was only able to replicate the weirdness by using a Cygwin vim. I couldn't get VirtualStore files to appear using gVim 7.3.46 (latest self-installing), 7.3e (old beta for 7.3), 7.3.106 (Vim with Cream), or the 64-bit 7.3 (from vim-win3264).


On 09/06/11 19:34, Benjamin R. Haskell wrote:
On Tue, 6 Sep 2011, Tim Chase wrote:
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.

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

Again I've responded with links to a slightly different problem with similar symptoms (frustration with Windows7 folder misdirection).

What's described above (and I think is the actual problem) is called User Account Control (UAC) Virtualization. There's a good description of it in the MSDN article "New UAC Technologies for Windows Vista":

http://msdn.microsoft.com/en-us/library/bb756960.aspx?ppud=4

Search for "File Virtualization".

Tim's summary was pretty good (if you try to edit something in a protected area, it redirects into some user-space area). Specifics:

C:\(Path to protected file)
becomes:
%localappdata%\VirtualStore\(Path to protected file)

e.g. for me:

C:\Program Files (x86)\Vim\vim73\colors\blue.vim
became:
C:\Users\bhaskell\AppData\Local\VirtualStore\Program Files 
(x86)\Vim\vim73\colors\blue.vim

If you're browsing a protected folder with Windows's standard folder browser, you can view any of these files by clicking the «Compatibility files» button below the location bar. (Could use that to determine definitively that that's the problem here.)

In a long, frustrated thread¹, "How to disable VirtualStore in Windows 7?", one of the workarounds is to "take ownership" of the directory (which makes the VirtualStore unnecessary). Might be useful info.

Not sure what a long-term solution for Vim under Windows should look like. As mentioned, I could only get this to happen using a Cygwin vim.exe. Even though I'm running 64-bit Win7, 32-bit gVim.exe's didn't exhibit the behavior (despite the MSDN article indicating they should -- maybe it changed from Vista to 7).

--
Best,
Ben

¹: 
http://answers.microsoft.com/en-us/windows/forum/windows_7-security/how-to-disable-virtualstore-in-windows-7/55dce284-0dcd-46af-892e-d2b9cf5bcff6

--
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

Reply via email to