filemanager: Only retry every 2sec if path opening doesn't work right away to avoid busy loop

This commit is contained in:
Johannes Zellner
2021-06-22 16:24:35 +02:00
parent 0e5f8e75f9
commit 7472e78755

View File

@@ -168,7 +168,7 @@ app.controller('FileManagerController', ['$scope', '$translate', '$timeout', 'Cl
}
Client.filesGet($scope.id, $scope.type, parentPath, 'data', function (error, result) {
if (error) return openPath(path); // try again
if (error) return setTimeout(function () { openPath(path); }, 2000); // try again in some time
// amend icons
result.entries.forEach(function (e) {