...
...
the fact that cygwin's handling of .. is not POSIX-compliant. I think a
better fix would be to change file_exists() itself instead of adding a
misnamed wrapper function; then bashline.c wouldn't even need patching.
The string 'tilde' need not even be in the patch; what you are really
after is a function that says that if '..' is found within a string
being probed for existence, then add an additional check to see if the
prefix of that string exists as a directory.
But I don't mind experimenting with the idea - it remains to be seen
whether people will complain that bash is noticeably slower because it
takes time to double-check instead of rely on cygwin's non-POSIX
shortcut. And the slowdown would only be on paths containing a '..'; I
would NOT be checking for symlinks (even though symlinks containing ..
are also being interpreted in a non-POSIX manner, it is much more
expensive to second-guess if you have to check every name for being a
symlink than it is to just check for literal ..).