Page 1 of 1

FTP view of a link does not work

Posted: 10 Apr 2008, 14:59
by pla
Although a link correctly shows the file it represents, F3 does not open the linked file. You need to look at LnkTgt item, find it, then press F3 to view it.
When there is a huge quantity of files in a directory, this is a painful job.

Posted: 10 Apr 2008, 16:12
by Petr Solin
When you try to open viewer, file (or file link) is downloaded to local machine. I have tested it here on proftpd server on linux, it works well. So it seems that you are connecting to FTP server which does not support links?

Try to download some file link (F5-Copy to local disk), it is the same operation from the point of FTP server. See FTP log (right click in panel > Show Log...), argument to RETR command.

Posted: 10 Apr 2008, 16:30
by Guest
Dump of an F5 operation:

(16:27:02): Downloading file "log_build_faultmodel_041008112913"...
CWD /home/pla/ET_Tests/MulanET70/testresults/logs
250 CWD command successful
PORT 10,33,41,248,11,56
200 PORT command successful
TYPE I
200 Type set to I
RETR log_build_faultmodel_041008112913
150 Opening BINARY mode data connection for log_build_faultmodel_041008112913 (14360 bytes)
226 Transfer complete.

Posted: 10 Apr 2008, 17:52
by pla
Just another remark:

The bottom tool bar button F3 is disabled when a link is selected.

Posted: 11 Apr 2008, 11:06
by Petr Solin
So it is another problem - the link is parsed as link to directory and not as link to file, so View (F3) is not working (as for other directories). There is no simple solution to this problem, if FTP client should try to access every link (to find out if it leads to directory or to file) it would be too slow.

You can change listing parser to parse all links as links to files, then F3 will work. How to do it:
  • open FTP log (right click > Show Log) and find line following LIST command, similar to this:

    Code: Select all

    Text listing was parsed by "UNIX1" server type...
  • open FTP configuration > Servers, find your server type (here UNIX1), click Edit
  • go to Rules for parsing of listing box and find all functions "unix_link" (here four times) and add ", assign(<is_dir>, false)" behind them. Maybe it is a good idea to copy&paste whole text to Notepad or other text editor to make changes easier. Sample:

    Code: Select all

    # parse lines with links
    * if(next_char=="l"), assign(<is_link>, true), word(<rights>), white_spaces(),
      word(), white_spaces(), word(<user>), white_spaces(), word(<group>),
      white_spaces(), word(), white_spaces(),
      month_3(<date>), white_spaces(), day(<date>), white_spaces(),
      year(<date>), white_spaces(2),
      assign(<is_hidden>, next_char=="."), unix_link(<is_dir>, <name>, <link>), assign(<is_dir>, false);
  • click OK and OK in FTP configuration

Posted: 11 Apr 2008, 17:46
by pla
Nice while a bit obscure solution.
It works...
Is there a way to keep the link icon "special" to show that it is a link?

Posted: 14 Apr 2008, 20:00
by Petr Solin
All links have special link icon overlay (small arrow in left bottom corner of icon).