EldoS | Feel safer!

Software components for data protection, secure storage and transfer

QT and UNC

Also by EldoS: Callback File System
Create virtual file systems and disks, expose and manage remote data as if they were files on the local disk.
Posted: 08/13/2013 15:14:15
by Charles Reimers (Basic support level)
Joined: 08/13/2013
Posts: 4

I am working with SolFS OS version inside a QT cross-platform environment and want to be able to operate on files without exposing a lettered drive in Windows. It appears that QT does not understand the UNC file path. Can anyone suggest a solution to my conundrum?

Posted: 08/14/2013 02:13:37
by Volodymyr Zinin (EldoS Corp.)

Please specify version of SolFS and a code snippet you use to create the mounting point.
Posted: 08/16/2013 13:44:22
by Charles Reimers (Basic support level)
Joined: 08/13/2013
Posts: 4


I was trying something along the lines of:

wchar_t *path;
mStorage->GetMountingPoint(0, (PSolFSWideChar)path);
QString qsPath = QString("\\\\.\\") + QString::fromUtf16((ushort*)path) + '\\';
delete[] path;
QDir fsDir(path);

// do operations on fsDir

After further investigation, this seems to be a limitation of QT, and not really a UNC question.

Posted: 08/16/2013 13:47:11
by Eugene Mayevski (EldoS Corp.)

IIRC some (not all) .NET classes don't handle UNC paths right as well. But there's not much we can do on our side with this. Maybe one can report this issue to Qt?

Sincerely yours
Eugene Mayevski
Posted: 08/19/2013 03:47:30
by Volodymyr Zinin (EldoS Corp.)

In the SolFS OS v5, which is prerelease now, there is a possibility to create a "real" UNC mounting point. Like "\\server_name\share_name", where "server_name" and "share_name" are arbitrary strings. So if Qt can work with UNC paths then it should work with such mounting points too. For details see the description of the SOLFS_SYMLINK_NETWORK flag.
Posted: 08/19/2013 03:54:48
by Eugene Mayevski (EldoS Corp.)

I believe QT just doesn't understand \\ in the beginning of the path.

Sincerely yours
Eugene Mayevski
Also by EldoS: Rethync
The cross-platform framework that simplifies synchronizing data between mobile and desktop applications and servers and cloud storages



Topic viewed 3262 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!