fixed sorting logic on directory list

This commit is contained in:
4nshuman 2024-10-20 02:00:58 +05:30
parent a646b02e45
commit fabc21ecf7

View File

@ -206,7 +206,7 @@ const upload = async function(items, dirPath, options = {}){
// Generate the requests to create all the
// folders in this upload
//-------------------------------------------------
dirs.sort();
dirs.sort((a, b) => b.path.length - a.path.length);
let mkdir_requests = [];
for(let i=0; i < dirs.length; i++){