File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -1334,6 +1334,7 @@ QString QgsProject::readPath( QString src ) const
13341334 {
13351335#if defined(Q_OS_WIN)
13361336 if ( src.startsWith ( " \\\\ " ) ||
1337+ src.startsWith ( " //" ) ||
13371338 ( src[0 ].isLetter () && src[1 ] == ' :' ) )
13381339 {
13391340 // UNC or absolute path
@@ -1371,11 +1372,21 @@ QString QgsProject::readPath( QString src ) const
13711372#if defined(Q_OS_WIN)
13721373 srcPath.replace ( " \\ " , " /" );
13731374 projPath.replace ( " \\ " , " /" );
1375+
1376+ bool uncPath = projPath.startsWith ( " //" );
13741377#endif
13751378
13761379 QStringList srcElems = srcPath.split ( " /" , QString::SkipEmptyParts );
13771380 QStringList projElems = projPath.split ( " /" , QString::SkipEmptyParts );
13781381
1382+ #if defined(Q_OS_WIN)
1383+ if ( uncPath )
1384+ {
1385+ projElems.insert ( 0 , " " );
1386+ projElems.insert ( 0 , " " );
1387+ }
1388+ #endif
1389+
13791390 // remove project file element
13801391 projElems.removeLast ();
13811392
You can’t perform that action at this time.
0 commit comments