@xuda.io/drive_module 1.1.715 → 1.1.717

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 +8 -10
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -75,9 +75,11 @@ const fs = require("fs");
75
75
  });
76
76
 
77
77
  const get_studio_path = function (raw_path, ref, file_name) {
78
- return raw_path
79
- .replaceAll(path.join(_conf.studio_drive_path, ref), "")
80
- .replaceAll("/" + file_name, "");
78
+ return (
79
+ raw_path
80
+ .replaceAll(path.join(_conf.studio_drive_path, ref), "")
81
+ .replaceAll("/" + file_name, "") || "/"
82
+ );
81
83
  };
82
84
 
83
85
  exports.get_drive_files = async function (req) {
@@ -360,13 +362,9 @@ exports.get_drive_files = async function (req) {
360
362
  // if (val.children) {
361
363
  // await drill(val.children);
362
364
  // }
363
- if (val.type === "file") {
364
- val.path = get_studio_path(
365
- val.path,
366
- app_id_master,
367
- val.relativePath
368
- );
369
- }
365
+ // if (val.type === "file") {
366
+ val.path = get_studio_path(val.path, app_id_master, val.relativePath);
367
+ // }
370
368
  }
371
369
  for await (var index of values_to_delete.reverse()) {
372
370
  node.splice(index, 1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/drive_module",
3
- "version": "1.1.715",
3
+ "version": "1.1.717",
4
4
  "description": "Xuda Drive Server Module",
5
5
  "main": "index.js",
6
6
  "dependencies": {