OpenToonz - An open-source full-featured 2D animation creation software
C
fix show folder contents for unc path
shun-iwasawa1bb5fc890880
diff --git a/toonz/sources/toonz/fileselection.cpp b/toonz/sources/toonz/fileselection.cppindex 7e1973c5b..e009bd57d 100644--- a/toonz/sources/toonz/fileselection.cpp+++ b/toonz/sources/toonz/fileselection.cpp@@ -327,12 +327,16 @@ void FileSelection::showFolderContents() {if (!model) return;folderPath = model->getFolder();}- if (TSystem::isUNC(folderPath))- QDesktopServices::openUrl(+ if (TSystem::isUNC(folderPath)) {+ bool ok = QDesktopServices::openUrl(QUrl(QString::fromStdWString(folderPath.getWideString())));- else- QDesktopServices::openUrl(QUrl::fromLocalFile(- QString::fromStdWString(folderPath.getWideString())));+ if (ok) return;+ // If the above fails, then try opening UNC path with the same way as the+ // local files.. QUrl::fromLocalFile() seems to work for UNC path as well in+ // our environment. (8/10/2021 shun-iwasawa)+ }+ QDesktopServices::openUrl(+ QUrl::fromLocalFile(QString::fromStdWString(folderPath.getWideString())));}//------------------------------------------------------------------------