Cloud documents - local batch delete file BUG and path modification BUG

Cloud documents - local batch delete file BUG and path modification BUG

When I tested, I found a problem. When modifying a file, if you listen first 删除and then listen again 新增, since deletion and addition are the data monitored by hooks, after deletion and then addition, the deleted data Will come back again, because the same hooks are listening, so the deleted data will not be successfully deleted in the new addition, that is, the newly added data is still the data before deletion.

So I thought about writing the modification, but I found another problem, that is, the modification of the node monitoring file is not the modification of the file path but the modification of the file content, which is troublesome because I cannot monitor the modification of the file path. Tried many ways, but it doesn't work. Panic.

Then I measured and found another problem. If you delete a file locally, there is no problem, but if you delete it in batches, there will be problems. So I thought of another question, why is there no problem in adding batches? I started to check the difference between the two, and found that in the deletion, because the key value of the object is id, I can’t obj[key]get the object corresponding to the title through the method, so I need to cycle the object to do the deletion operation, which is It led to a waste of time. I suspect that the time is too long, causing all of them to be monitored and deleted by a hook. Then I saw that the deletion of the file name is normal, which verified my idea.

So my next task is to modify the object of the file name first. See if you can.

As for the bug of monitoring and modifying the path, I will first see if it can be solved after changing the file name object. If not, I will find another way.

Guess you like

Origin blog.csdn.net/qq_51965698/article/details/127820539