FTP with non-root home



Hello!

The recent message by Rene Blokland shows that we have a long-standing
problem that we cannot fix for years.  I mean support for FTP servers,
which set the initial directory to some other value than "/".

I think we need some discussion before we start coding, otherwise we'll
continue to break each other's code to "fix" the problem.

I think there are 3 different approaches to solving this problem:

1) When /#ftp:server is requested, interpret it as "/#ftp:server/" and go
to the root directory.  This is consistent with fish and very easy to
implement (just remove special handling for empty remote_path in
dir_load()).  The downside is that the user would have to return to the
home directory, which name is not always as simple as /home/username.  
The workaround for the user is to do it once and record the directory to
the hotlist.

2) Interpret "/#ftp:server" as the home directory on the remote server.  
The resulting directory with full path would become the current directory.  
This means that mc_chdir() won't always change the directory to exactly
what was requested.  In other words, you can call
mc_chdir("/#ftp:server"), but the current directory will be
"/#ftp:server/home/user"

3) Interpret symbol "~" as the home directory on the remote server.  
Expand "/#ftp:server" to "/#ftp:server/~/" before calling VFS level.  I
believe this was already tried and rejected because of complexity.  This
also can be confusing to the users.  On the positive side, that's the only
syntax that will allow paths like "/#ftp:server/~/tmp" without knowing the
home directory.

Comments and better ideas will be appreciated.

-- 
Regards,
Pavel Roskin




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