@xuda.io/drive_module 1.1.499 → 1.1.501
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 +9 -8
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1859,12 +1859,12 @@ exports.get_drive_size = async function (req) {
|
|
|
1859
1859
|
let size = 0;
|
|
1860
1860
|
// validate_drive_type(drive_type);
|
|
1861
1861
|
|
|
1862
|
-
var ref;
|
|
1863
|
-
if (drive_type === "user") {
|
|
1864
|
-
|
|
1865
|
-
} else {
|
|
1866
|
-
|
|
1867
|
-
}
|
|
1862
|
+
// var ref;
|
|
1863
|
+
// if (drive_type === "user") {
|
|
1864
|
+
// ref = uid;
|
|
1865
|
+
// } else {
|
|
1866
|
+
// ref = await _common.get_project_app_id(app_id, true);
|
|
1867
|
+
// }
|
|
1868
1868
|
|
|
1869
1869
|
switch (drive_type) {
|
|
1870
1870
|
case "user":
|
|
@@ -1873,12 +1873,13 @@ exports.get_drive_size = async function (req) {
|
|
|
1873
1873
|
break;
|
|
1874
1874
|
|
|
1875
1875
|
default:
|
|
1876
|
+
const app_id_master = await _common.get_project_app_id(app_id, true);
|
|
1876
1877
|
const directoryPath = path.join(
|
|
1877
1878
|
_conf[`${drive_type}_drive_path`],
|
|
1878
|
-
|
|
1879
|
+
app_id_master,
|
|
1879
1880
|
"/"
|
|
1880
1881
|
);
|
|
1881
|
-
size = await get_folder_size(directoryPath, drive_type,
|
|
1882
|
+
size = await get_folder_size(directoryPath, drive_type, app_id_master);
|
|
1882
1883
|
break;
|
|
1883
1884
|
}
|
|
1884
1885
|
|