qbit_manage icon indicating copy to clipboard operation
qbit_manage copied to clipboard

[Bug]: Removing newly empty directories bypasses exclude patterns

Open washedszn opened this issue 6 months ago • 0 comments

Describe the Bug

Exclude pattern will not prevent rem_orphaned from deleting empty directories within a directory that rem_orphaned is run on. Kinda difficult explaining so I'll use an example:

A user has the following directory: /data/torrents/tv/links

They want to ignore the following folder inside links: /data/torrents/tv/links/cross-seed

So they add the exclude pattern: /data/torrents/*/links/cross-seed/**

This successfully prevents qbitmanage from deleting any files inside /data/torrents/*/links/cross-seed/. However, if that directory is empty and rem_orphaned removes a file inside /data/torrents/*/links/, then the functionality of removing newly empty directories will delete the cross-seed folder - despite it being excluded.

I'd say this is pretty much the result of a bad user setup, although I still think this is a bug. Also, to confirm this I created an isolated environment to test with - just to make it faster creating/deleting files etc. Let me know if you want that to reproduce the bug.

Config

No response

Logs

N/A

Screenshots

No response

Installation

Docker

Version Number

4.1.7

What branch are you on?

master

washedszn avatar Aug 02 '24 08:08 washedszn