@xuda.io/drive_module 1.1.708 → 1.1.710

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