@xuda.io/drive_module 1.1.522 → 1.1.524
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +7 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -328,7 +328,9 @@ exports.get_drive_files = async function (req) {
|
|
|
328
328
|
|
|
329
329
|
if (tree?.children) {
|
|
330
330
|
if (type === "file") {
|
|
331
|
-
tree.children = tree.children
|
|
331
|
+
tree.children = tree.children
|
|
332
|
+
.filter((e) => e.type === type)
|
|
333
|
+
.slice(from, to + 1);
|
|
332
334
|
}
|
|
333
335
|
await drill(tree.children);
|
|
334
336
|
} else {
|
|
@@ -1904,6 +1906,10 @@ exports.get_drive_size = async function (req) {
|
|
|
1904
1906
|
}
|
|
1905
1907
|
|
|
1906
1908
|
size = await get_folder_size(directoryPath, drive_type, app_id_master, uid);
|
|
1909
|
+
if (drive_type === "workspace") {
|
|
1910
|
+
// calc datacenter
|
|
1911
|
+
size += await get_folder_size(directoryPath, drive_type, app_id);
|
|
1912
|
+
}
|
|
1907
1913
|
|
|
1908
1914
|
return { code: 200, data: size };
|
|
1909
1915
|
} catch (err) {
|