@xuda.io/drive_module 1.1.701 → 1.1.703

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 +9 -3
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -74,6 +74,12 @@ const fs = require("fs");
74
74
  });
75
75
  });
76
76
 
77
+ const get_path = function (raw_path, ref, file_name) {
78
+ return raw_path
79
+ .replaceAll(path.join(_conf.studio_drive_path, ref), "")
80
+ .replaceAll(file_name, "");
81
+ };
82
+
77
83
  exports.get_drive_files = async function (req) {
78
84
  const {
79
85
  from = 0,
@@ -321,9 +327,9 @@ exports.get_drive_files = async function (req) {
321
327
  );
322
328
  }
323
329
 
324
- val.path = val.path
325
- .replaceAll(path.join(_conf.studio_drive_path, app_id_master), "")
326
- .replaceAll(val.relativePath, "");
330
+ val.path = get_path(val.path, app_id_master, val.relativePath); //val.path
331
+ // .replaceAll(path.join(_conf.studio_drive_path, app_id_master), "")
332
+ // .replaceAll(val.relativePath, "");
327
333
 
328
334
  delete ret.data._id;
329
335
  delete ret.data._rev;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/drive_module",
3
- "version": "1.1.701",
3
+ "version": "1.1.703",
4
4
  "description": "Xuda Drive Server Module",
5
5
  "main": "index.js",
6
6
  "dependencies": {