Re: tilde-bug in vfs.c

Hello, Oskar!

> There is a bug which makes mc display regular file named '~root'
> (or '~<someaccount>') as a directory.

I know about this problem.  I even tried to fix it, but could not find a 
good solution.

Basically, the title expansion should be completely done on the highest 
level, when the data is received from the user.  In UNIX, it is done in 
the shell.  The filesystem doesn't do title expansion.  MC should do 
exactly that.

The problem is that sometimes VFS must be used to expand a tilde.  I mean 
things like this:


If we want to support this notation, then there should be some way to 
pass the "origin" of the text to VFS.

Possible solutions:

1) Remove any tilde expansion from VFS.
2) Expand tilde only on the filesystems where it makes sense (fish).
3) Quote tildes when passing filenames to VFS, unless it's user input.
4) Add arguments to VFS functions to distinguish user input.
5) Use some flags for VFS to distinguish user input.

I actually don't see any solution that I would like.

What does your patch implement?  How does it work?  Please always comment
non-obvious patches.  In this case we really should make a decision before
we go ahead and patch the code.

Pavel Roskin

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]