@xuda.io/drive_module 1.1.798 → 1.1.799
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.js +7 -11
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1097,19 +1097,15 @@ exports.rename_drive_file = async function (req, job_id, headers) {
|
|
|
1097
1097
|
|
|
1098
1098
|
let doc = await get_drive_doc(drive_type, app_id, uid, file_path, headers);
|
|
1099
1099
|
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
uid,
|
|
1103
|
-
drive_type,
|
|
1104
|
-
file_path,
|
|
1105
|
-
};
|
|
1106
|
-
const check_existing_file_ret = await module.exports.check_drive_file(
|
|
1107
|
-
check_req
|
|
1108
|
-
);
|
|
1100
|
+
if (drive_type === "studio") {
|
|
1101
|
+
await fs_module.rename(file_path, file_name_to);
|
|
1109
1102
|
|
|
1110
|
-
|
|
1103
|
+
doc._delete = true;
|
|
1104
|
+
await db_module.save_app_couch_doc(app_id_master, doc_ret.data);
|
|
1111
1105
|
|
|
1112
|
-
|
|
1106
|
+
doc._id = file_name_to;
|
|
1107
|
+
delete doc._rev;
|
|
1108
|
+
}
|
|
1113
1109
|
|
|
1114
1110
|
switch (drive_type) {
|
|
1115
1111
|
case "studio": {
|