Symlinks on SFTP

Support for Android version of Total Commander

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
Unused
Member
Member
Posts: 122
Joined: 2005-01-19, 20:26 UTC

Symlinks on SFTP

Post by *Unused »

When i show the contents of a folder on a Linux host where i connected via SFTP Plugin, the symlink icons are visible as files. Is there some way to display them as the target type? For example, when the symlink target is a folder, display it as a folder (and sort it as folder), if the target of the symlink is a file, use the file icon...
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Symlinks on SFTP

Post by *ghisler(Author) »

You can't see from the directory listing whether a symlink points to a file or a folder. That's why they are shown as files - when you then try to open them, the plugin will resolve the symlink and see whether it points to a file or folder.
Author of Total Commander
https://www.ghisler.com
User avatar
Unused
Member
Member
Posts: 122
Joined: 2005-01-19, 20:26 UTC

Re: Symlinks on SFTP

Post by *Unused »

Can you please try to add this as a feature request? At least i have seen this working in Ghost Commander. But i would like to use Total Commander. It has the better handling for favorites and some more things.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Symlinks on SFTP

Post by *ghisler(Author) »

I'm not aware of an easy way to add this. The plugin would have to visit each target just to check whether it is a file or a folder. When there are, say, 10'000 symlinks in one folder, it would mean 10'000 requests to the server.
Author of Total Commander
https://www.ghisler.com
User avatar
Unused
Member
Member
Posts: 122
Joined: 2005-01-19, 20:26 UTC

Re: Symlinks on SFTP

Post by *Unused »

I have no idea, if you get back a single object with all the fs entries in it or you get back a object per fs entry. If the first is the case, maybe there is a way to update the object with the needed info, before you send the reponse. If the later is the case > mostly there are only a handfull symlinks in a directory. Personally i use them a lot (I dont use Windows anymore, since Windows 11 as released) on Desktop (Arch) and Server (Debian). But i have never more than 10 symlinks in the current directory. But its your app. Its only a small wish/request.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Symlinks on SFTP

Post by *ghisler(Author) »

It's like you logged into the server via SSH secure shell and issued a few ls -l commands - they don't tell you whether the target is a file or a folder. Or is there an ls parameter to get this information?
Author of Total Commander
https://www.ghisler.com
User avatar
Unused
Member
Member
Posts: 122
Joined: 2005-01-19, 20:26 UTC

Re: Symlinks on SFTP

Post by *Unused »

What's with

Code: Select all

ls -lL
or

Code: Select all

ls -lF
. In the last case, this adds a / to the target, if the target is a directory.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Symlinks on SFTP

Post by *ghisler(Author) »

I will try it, thanks!
Author of Total Commander
https://www.ghisler.com
Post Reply