This is the mail archive of the
mailing list for the Cygwin project.
RE: [ANNOUNCEMENT] Updated: vim-7.0.122-1
- From: "Dave Korn" <dave dot korn at artimi dot com>
- To: <cygwin at cygwin dot com>
- Date: Wed, 11 Oct 2006 18:36:52 +0100
- Subject: RE: [ANNOUNCEMENT] Updated: vim-7.0.122-1
On 11 October 2006 18:15, Frank Fesevur wrote:
> I've tried his test case and Mark is right. When a symlink is created
> with a win32 path, vim can not create the swapfile. When a symlink is
> created with POSIX filenames there is no problem.
Well of course not. Cygwin - as a special feature - interprets DOS paths.
VIM has no notion of them, so when it reads the symlink content and tries to
figure out which directory it is pointing to a file in, it can't understand
what's going on.
The solution I'm afraid is "WDDTT" WRT creating cygwin symlinks with dos
paths. Cygwin can do magical path translation when someone passes an argument
to open(...), but there's no way it can know when a program reads a path from
somewhere and manipulates it itself.
Maybe the base-files package should create the symlinks to cygdrive paths in
the first place? It solves the problem:
dk@rainbow ~> cd /etc
dk@rainbow /etc> ln -s /cygdrive/c/WINDOWS/system32/drivers/etc/hosts cyghosts
dk@rainbow /etc> ls -la | grep hosts
lrwxrwxrwx 1 dk Domain Users 46 Oct 11 18:31 cyghosts ->
lrwxrwxrwx 1 dk Domain Users 37 May 18 13:17 hosts ->
dk@rainbow /etc> vim hosts
E303: Unable to open swap file for "hosts", recovery impossible
"hosts" [dos format] 29 lines, 1101 characters
Press ENTER or type command to continue
dk@rainbow /etc> vim cyghosts
"cyghosts" [dos format] 29 lines, 1101 characters
... although I can see problems arising when someone uses mount to rename the
cygdrive mount. Maybe it would be worth providing a notation that means
'cygdrive, no matter how it may have been renamed.
Can't think of a witty .sigline today....
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html