Qt World Summit: Register Today!

[SOLVED] Passing Network file paths from Windows to Mac OSX (and vice-versa)

  • Hi,

    I want to send from a client to a server the path to a file located on a NAS. I use QUrl for that. If I use a mapped drive to the network share (S drive for example), the QUrl sent to the server is of the form:
    And the server has no idea how to open this file on his side.

    So how a Qt client can safely send an Url to a server so that it can access the network file?

    Thanks for any help.

  • Moderators

    I don't think there is any good solution here. A mapped drive can be anything, and on Unix/ Mac a share can be mounted in a myriad of ways...

    One way that could work is to try and find the IP of the drive, and send that to the other side. Then, the recipient would have to find that share and where it is mounted, and stitch the URL by itself.

  • Ok, thanks. If I avoid using mapped drives, then I send an QUrl with the form file://myPath to the file. On the MAC side, just replacing file: with smb: works. I will see how to implement your solution as it seems more robust.

    Thanks a lot!
    Best regards.

Log in to reply