Cloudreve icon indicating copy to clipboard operation
Cloudreve copied to clipboard

Fix: unexpected querying all files when deleting an empty folder

Open topjohncian opened this issue 3 years ago • 0 comments

Fix deleting an empty folder takes a too long time when the size of files is large.

Empty folders have no children, so the parameter of RemoveFilesWithSoftLinks is also an empty slice. Then, it builds and executes a query SELECT * FROM files with no WHERE conditions, which takes the longest time.

image

topjohncian avatar Sep 09 '22 13:09 topjohncian