-Inconsistent FTP URL handling

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: Hacker, petermad, Stefan2, white

Post Reply
Abmea
Junior Member
Junior Member
Posts: 19
Joined: 2013-10-02, 15:45 UTC

-Inconsistent FTP URL handling

Post by *Abmea »

If you try to navigate using a FTP URL that includes a file name (for example ftp://un:pw@ftp.server/dir1/photo1.jpg) then the outcome differs depending on how you use the URL.

If you use the URL as a TC command-line option or with CD, TC opens the FTP connection, navigates to the right folder and selects the file. Correct.
The FTP output shows that TC first tries to interpret the file name as a folder, but then corrects it.

However, if you paste the URL into the panel header (where the breadcrum path is) of an open FTP connection then TC executes a FTP CWD with the entire URL and fails to navigate to the file.
Note that TC DOES select the file if you do the same thing with a 'normal' (SMB) path. This is inconsistent.

My underlying problem is that there's no good way of using a FTP File-URL in TC (that was for example produced with cm_CopyFullFileNamesToClip). The basic idea is that I get mailed a FTP URL that I want to navigate to in TC.

The command-line option works, but only if I manually add username:password. Without it, TC will get stuck in a retry loop if the FTP site requires authentication. This is another inconsistency because TC does detect the authentication when the same connection is opened with FTPOPEN without any saved credentials (but I cannot use FTPOPEN because it doesn't take a path as a parameter).
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

However, if you paste the URL into the panel header (where the breadcrum path is) of an open FTP connection then TC executes a FTP CWD with the entire URL and fails to navigate to the file.
Sorry, the panel header does not support URLs, only paths.
Author of Total Commander
https://www.ghisler.com
Abmea
Junior Member
Junior Member
Posts: 19
Joined: 2013-10-02, 15:45 UTC

Post by *Abmea »

Ok. Thanks a lot for the reply.

That's too bad, especially since you seem to already have all the logic on board to fix this (CD "URL" does this).

And what about the second inconsistency I mentioned (the authentication loop when using a URL on the command-line)?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

The correct way to open an URL is to click on the URL button or press Ctrl+N. This also supports HTTP downloads.
Author of Total Commander
https://www.ghisler.com
Abmea
Junior Member
Junior Member
Posts: 19
Joined: 2013-10-02, 15:45 UTC

Post by *Abmea »

Thanks, that's indeed what I started out with. That method always starts a new connection however.

Since I'm using TC FTP over high delay (SatCom) links, I was looking for a good way to navigate to the URL using an already established connection to avoid the pain of the whole connection setup and authentication sequence over and over again. That's when I came across these inconsistencies.

Couldn't TC detect that it already has a connection open to the same server as the URL that is being openen and then use that existing connection?

For example an extension to FTPOPEN that takes a (full or relative) URL, like: FTPOPEN MyStoredConnection "/path/to/file.jpg" /e (e= use existing connection)

Anyway, thanks for the help so far!
Post Reply