Follow Windows softlinks (shortcuts) with SMB

I use SMB to get to windows shares where most of my files are stored. Windows will treat a a remote shortcut (windows versions of softlink) as a file, and follow the link. Linux/SMB doesn’t seem to follow the link by default.

It would be very helpful if OSMC would follow the windows share links, and treat them as normal files.

Unfortunately as far as I’m aware, the SMB client built into Kodi is not able to follow windows shortcuts in an SMB share.

A Windows shortcut is not really functionally the same as a symlink btw, a symlink in Linux is handled at the file system level (to any application a symlink looks like the file that it points to) so that is something that can be exported over a file share, whereas a Windows shortcut is handled at the application level - eg Windows Explorer (and standard file dialogs) have specific knowledge of what a shortcut is and how to deal with it - but try using a shortcut from a windows command prompt (for example try opening a shortcut to a text file in edit) and it will not work, because a shortcut in reality is just a normal file with some metadata in it that the Explorer GUI (but not much else) understands.

Consider also that shortcuts typically point to drive letters or mapped drive letters, exporting that via an SMB share doesn’t really help you because the client (in this case Kodi) cannot resolve the drive letter mapping. So while I could be wrong, I can’t really see how this could work in the general case, and that’s probably why Linux and Kodi don’t support resolving shotcuts on network drives.

I understand that there are issues, but somehow Windows manages to follow windows shortcuts on remote mounted directories, so there must be a way (although Windows may do it via hacks of some sort.)

I will investigate further to see if anyone in the linux world has implemented what I want. I agree that it doesn’t seem to be built into Samba, which seems be an a missing feature.


Just a thought - have you tried mounting the remote directories, to see if the links get followed?