@xuda.io/drive_module 1.1.520 → 1.1.522
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 +2 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1880,6 +1880,7 @@ exports.get_drive_size = async function (req) {
|
|
|
1880
1880
|
// } else {
|
|
1881
1881
|
// ref = await _common.get_project_app_id(app_id, true);
|
|
1882
1882
|
// }
|
|
1883
|
+
|
|
1883
1884
|
let app_id_master, directoryPath;
|
|
1884
1885
|
switch (drive_type) {
|
|
1885
1886
|
case "user":
|
|
@@ -2044,7 +2045,7 @@ const get_folder_size = async function (dir, drive_type, app_id, uid) {
|
|
|
2044
2045
|
if (doc.type === "directory") {
|
|
2045
2046
|
await calculateSizeDocs(path.join("/", doc._id));
|
|
2046
2047
|
} else {
|
|
2047
|
-
totalSize += doc.size;
|
|
2048
|
+
totalSize += doc.size || 0;
|
|
2048
2049
|
}
|
|
2049
2050
|
}
|
|
2050
2051
|
};
|