There is no OS level solution, if there were then these threads wouldn't exist wsl and cifs are not relevant here as they just refer to mechanisms for mounting something in Linux. The point is that irrespective of what hosts those files and how you mount them, the path will vary by OS and MC stores the literal path in the library thus an application level translation will be required.
Indeed. Roderick, there can never be a network path that works to access the files on Windows that will also work on Linux and Mac OS. They're fundamentally different naming schemes.
If you dig into WSL a little further you'll find that different paths are used to access the same files inside WSL versus outside WSL. Ie a Linux app running under WSL might access a file as
/mnt/share/file where the Windows OS would access it as
Z:\file or
\\host\share\file. So even when Windows is launching Linux apps via the WSL framework, still different paths are used.
On top of that, installing WSL makes no difference to how paths are used outside of WSL. That is, installing WSL on Windows makes no difference to how Windows apps access files, so it can't possibly affect the interaction between Windows MC and any other OS' MC.
There is no single path that can work for both Windows and Linux/MacOS at the same time, regardless of WSL usage - not even if Linux MC were run
under WSL (not that that is possible, or useful.)
When a single Filename path is used to access the same network files on different OS - as MC does - some kind of translation has to occur before the path can be simultaneously valid on all. (More specifically, translation has to occur to make a path simultaneously valid on Windows and any *nix OS; it is possible for Linux and Mac OS to use the same path without translation.)
If the above ideas don't work and something needs to be done in MC, it would make more sense to me to use a Global Variable which was different for each installation and stored the base address, such as suggested in this post, because then at least the operating system is doing the substitution, so the solution should work in all(?) places within the OS.
If a variable substitution was used as per matt's suggestion, then this is still an MC-specific thing. Nothing to do with the OS.
A variable-based substitution is certainly one way to do it, ie the library is first updated with a find and replace, changing \\SERVER\SHARE to $BASEPATH, and then $BASEPATH is set in the configuration of Windows MC, Linux MC and Mac OS MC to point to, respectively, \\SERVER\SHARE, /mnt/share and /Volumes/share (for example).
Personally I still prefer my idea of substitutions being applied only in the Library Client code. It seems cleaner and neater to me - only apply the changes where they are needed. In an MC network that consists of two Windows MC and one Mac OS - as mine does - only the Mac OS would need to apply a substitution, and the library Filename paths could be left to working UNC paths for the two Windows hosts. So no mass library update would be required, and the substitution would happen only on the Mac OS install and only while it synced the library back and forth.
Either solution works and I'd be more than happy with any fix that solves our problem. But personally I think it's a bit cleaner to isolate the change to only where it's needed, namely the Library Client code. That might also make for a simpler code change with less testing required.