@xuda.io/drive_module 1.1.477 → 1.1.479
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 +13 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -497,6 +497,19 @@ exports.delete_drive_files = async function (req) {
|
|
|
497
497
|
|
|
498
498
|
const ret = rimraf.sync(file.path); // delete the file
|
|
499
499
|
if (doc_ret.code > -1) {
|
|
500
|
+
if (doc_ret.data.type === "directory") {
|
|
501
|
+
const docs = await get_folder_docs(
|
|
502
|
+
path.basename(file.path),
|
|
503
|
+
drive_type,
|
|
504
|
+
null
|
|
505
|
+
);
|
|
506
|
+
for await (let doc of docs) {
|
|
507
|
+
doc._deleted = true;
|
|
508
|
+
|
|
509
|
+
await db_module.save_app_couch_doc(app_id_master, doc);
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
|
|
500
513
|
doc_ret.data._deleted = true;
|
|
501
514
|
save_ret = await db_module.save_app_couch_doc(
|
|
502
515
|
app_id_master,
|