@xuda.io/drive_module 1.1.500 → 1.1.502

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.
Files changed (2) hide show
  1. package/index.js +5 -5
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1876,10 +1876,10 @@ exports.get_drive_size = async function (req) {
1876
1876
  const app_id_master = await _common.get_project_app_id(app_id, true);
1877
1877
  const directoryPath = path.join(
1878
1878
  _conf[`${drive_type}_drive_path`],
1879
- ref,
1879
+ app_id_master,
1880
1880
  "/"
1881
1881
  );
1882
- size = await get_folder_size(directoryPath, drive_type, app_id);
1882
+ size = await get_folder_size(directoryPath, drive_type, app_id_master);
1883
1883
  break;
1884
1884
  }
1885
1885
 
@@ -2024,10 +2024,10 @@ const get_folder_size = async function (dir, drive_type, app_id) {
2024
2024
  }
2025
2025
  };
2026
2026
 
2027
- if (drive_type === "studio") {
2028
- await calculateSizeFs(dir);
2029
- } else {
2027
+ if (["user", "workspace.includes"].includes(drive_type)) {
2030
2028
  await calculateSizeDocs(dir);
2029
+ } else {
2030
+ await calculateSizeFs(dir);
2031
2031
  }
2032
2032
  return totalSize;
2033
2033
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/drive_module",
3
- "version": "1.1.500",
3
+ "version": "1.1.502",
4
4
  "description": "Xuda Drive Server Module",
5
5
  "main": "index.js",
6
6
  "dependencies": {