Skip to content

OpenToonz - An open-source full-featured 2D animation creation software

C

Fix-update-folder-delay

Abel You050ceb01f532
diff --git a/toonz/sources/toonz/filebrowsermodel.cpp b/toonz/sources/toonz/filebrowsermodel.cpp
index bb8aaf054..78fb566a6 100644
--- a/toonz/sources/toonz/filebrowsermodel.cpp
+++ b/toonz/sources/toonz/filebrowsermodel.cpp
@@ -1209,17 +1209,20 @@ DvDirModelNode *DvDirModelRootNode::getNodeByPath(const TFilePath &path) {
// it could be a network folder
if (m_networkNode) {
- for (i = 0; i < m_networkNode->getChildCount(); i++) {
- DvDirModelNode *node = m_networkNode->getChild(i)->getNodeByPath(path);
- if (node) return node;
- }
-
- // try to find in the network
QString pathStr = path.getQString();
- if ((pathStr.startsWith("\\\\") || pathStr.startsWith("//")) &&
- QDir(pathStr).exists()) {
- DvDirModelNode *node = m_networkNode->createNetworkFolderNode(path);
- if (node) return node;
+ if (pathStr.startsWith("\\\\") || pathStr.startsWith("//")) {
+
+ for (i = 0; i < m_networkNode->getChildCount(); i++) {
+ DvDirModelNode *node = m_networkNode->getChild(i)->getNodeByPath(path);
+ if (node) return node;
+ }
+
+ // try to find in the network
+ if (QDir(pathStr).exists()) {
+ DvDirModelNode *node = m_networkNode->createNetworkFolderNode(path);
+ if (node) return node;
+ }
+
}
}