@xuda.io/drive_module 1.1.1285 → 1.1.1287
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.
- package/index.mjs +9 -9
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -693,20 +693,20 @@ export const create_drive_folder = async (req, job_id, headers) => {
|
|
|
693
693
|
case 'studio': {
|
|
694
694
|
folder_id = req.folder_name;
|
|
695
695
|
const app_id_master = await _common.get_project_app_id(app_id, true);
|
|
696
|
-
if (!file_path.includes(app_id_master)) {
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
}
|
|
696
|
+
// if (!file_path.includes(app_id_master)) {
|
|
697
|
+
// return {
|
|
698
|
+
// code: -1,
|
|
699
|
+
// data: 'error - file path unauthorized',
|
|
700
|
+
// };
|
|
701
|
+
// }
|
|
702
702
|
|
|
703
703
|
target_dir = path.join(file_path, folder_id);
|
|
704
|
-
|
|
705
|
-
folder_exist = await file_exists(
|
|
704
|
+
const fs_target_dir = path.join(_conf[`studio_drive_path`], master_app_id, target_dir);
|
|
705
|
+
folder_exist = await file_exists(fs_target_dir);
|
|
706
706
|
if (folder_exist) {
|
|
707
707
|
throw new Error('folder exist');
|
|
708
708
|
}
|
|
709
|
-
await create_directory(
|
|
709
|
+
await create_directory(fs_target_dir, 0o775, true);
|
|
710
710
|
doc._id = folder_id;
|
|
711
711
|
save_ret = await db_module.save_app_couch_doc(app_id_master, doc);
|
|
712
712
|
misc_module.rsync_drive_resources_to_remote_servers('studio', app_id_master);
|