@xuda.io/drive_module 1.1.1283 → 1.1.1285

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.mjs +6 -4
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -699,10 +699,9 @@ export const create_drive_folder = async (req, job_id, headers) => {
699
699
  data: 'error - file path unauthorized',
700
700
  };
701
701
  }
702
- target_dir = file_path + '/' + folder_id;
703
- if (check_req.type === 'directory') {
704
- target_dir = path.join(file_path, folder_id);
705
- }
702
+
703
+ target_dir = path.join(file_path, folder_id);
704
+
706
705
  folder_exist = await file_exists(target_dir);
707
706
  if (folder_exist) {
708
707
  throw new Error('folder exist');
@@ -1236,6 +1235,9 @@ export const check_drive_file = async (req, job_id, headers, file_obj) => {
1236
1235
  const target_dir = path.join(_conf[`studio_drive_path`], master_app_id);
1237
1236
 
1238
1237
  let target_file = path.join(target_dir, file_path);
1238
+ if (type === 'directory') {
1239
+ target_file = path.join(target_dir, file_path, folder_name);
1240
+ }
1239
1241
 
1240
1242
  if (await fs_module.file_exists(target_file)) {
1241
1243
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/drive_module",
3
- "version": "1.1.1283",
3
+ "version": "1.1.1285",
4
4
  "description": "Xuda Drive Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {