|
@@ -1458,6 +1458,7 @@
|
|
|
|
|
|
// ============================== FOLDER LISTING FUNCTIONS ====================
|
|
|
function listDirectory(path, callback=undefined, recordUndo=true){
|
|
|
+ enableAutoRefresh = false;
|
|
|
var recordPreviousPage = true;
|
|
|
if (recordUndo == false){
|
|
|
recordPreviousPage = false;
|
|
@@ -1585,18 +1586,14 @@
|
|
|
}
|
|
|
return
|
|
|
}
|
|
|
- //console.log("Path parse error! Redirecting to parent directory.", data.error);
|
|
|
- //var pdir = currentPath.split("/");
|
|
|
- //pdir.pop(); pdir.pop();
|
|
|
- //pdir = pdir.join("/");
|
|
|
- //currentPath = pdir;
|
|
|
- enableAutoRefresh = false;
|
|
|
+
|
|
|
+
|
|
|
//Check if it is already rooted and no more parent ahead
|
|
|
if (currentPath == ""){
|
|
|
currentPath = "user:/";
|
|
|
}
|
|
|
|
|
|
- //Print folder not found exceotion
|
|
|
+ //Print folder not found exception
|
|
|
$("#folderList").show();
|
|
|
$("#folderList").html(`<div class="ts basic segment ${currentTheme}">
|
|
|
<div class="ts header">
|
|
@@ -1607,9 +1604,7 @@
|
|
|
</div>`);
|
|
|
$("#fileList").hide();
|
|
|
|
|
|
- //listDirectory(currentPath, function(){
|
|
|
- // window.location.reload();
|
|
|
- //});
|
|
|
+ enableAutoRefresh = false;
|
|
|
return;
|
|
|
}else{
|
|
|
enableAutoRefresh = true;
|
|
@@ -1629,10 +1624,18 @@
|
|
|
if (callback !== undefined){
|
|
|
callback();
|
|
|
}
|
|
|
+
|
|
|
+ enableAutoRefresh = true;
|
|
|
});
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
+ error: function(){
|
|
|
+ enableAutoRefresh = true;
|
|
|
+ }
|
|
|
});
|
|
|
+ },
|
|
|
+ error: function(){
|
|
|
+ enableAutoRefresh = true;
|
|
|
}
|
|
|
});
|
|
|
}
|