From 1b6b9c2126da6d3670ca7536351c7555c1d3ed6b Mon Sep 17 00:00:00 2001 From: ClemDee Date: Wed, 19 Jun 2019 15:47:22 +0200 Subject: [PATCH] Fix infinite recursive loop _findFileInRoot --- www/common/userObject.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/www/common/userObject.js b/www/common/userObject.js index 1a2229d40..a4b18d514 100644 --- a/www/common/userObject.js +++ b/www/common/userObject.js @@ -353,10 +353,12 @@ define([ } return paths; } - for (var e in root) { - var nPath = path.slice(); - nPath.push(e); - _findFileInRoot(nPath, file).forEach(addPaths); + if (isFolder(root)) { + for (var e in root) { + var nPath = path.slice(); + nPath.push(e); + _findFileInRoot(nPath, file).forEach(addPaths); + } } return paths;