History

don't put empty folders at end of scripts tree. allow /~/ to work from outside scripts

Seth Alves committed 10 years ago

Commit cfa847b1 parent 82990414 files · +10 −6Browse files

Showing the changes to libraries/script-engine/src/ScriptsModel.cpp (1 of 4 files). Show all

Unified · Split

libraries/script-engine/src/ScriptsModel.cpp+3−0
@@ -309,6 +309,9 @@ void ScriptsModel::rebuildTree() { · 308 unmodified lines
309309 QString hash;
310310 QStringList pathList = script->getLocalPath().split(tr("/"));
311311 pathList.removeLast();
312+ if (pathList.isEmpty()) {
313+ continue;
314+ }
312315 QStringList::const_iterator pathIterator;
313316 for (pathIterator = pathList.constBegin(); pathIterator != pathList.constEnd(); ++pathIterator) {
314317 hash.append(*pathIterator + "/");