Skip to content

Add path-based filtering to AutoFreeSpace plugin#508

Open
tsautier wants to merge 1 commit intodrftpd-ng:masterfrom
tsautier:fix/issue-58
Open

Add path-based filtering to AutoFreeSpace plugin#508
tsautier wants to merge 1 commit intodrftpd-ng:masterfrom
tsautier:fix/issue-58

Conversation

@tsautier
Copy link
Copy Markdown

@tsautier tsautier commented Jan 14, 2026

Problem

AutoFreeSpace plugin only supported section-based configuration, making it difficult to target specific subdirectories (e.g., dated dirs like /MP3/1023/) without defining them as sections.

Solution

Implemented path-based filtering as an alternative to section-based configuration.

Changes Made

  • Modified AutoFreeSpaceSettings to support X.path=<pattern> in autofreespace.conf.
  • Updated AutoFreeSpace.MrCleanIt to iterate over configured path patterns.
  • Added a helper findDirectoryForPath to resolve path patterns, including simple wildcard support (/MP3/*).
  • Updated autofreespace.conf.dist with an example of the new X.path configuration.

Fixes #58

@tsautier tsautier changed the title Issue #58: Add path-based filtering to AutoFreeSpace plugin Add path-based filtering to AutoFreeSpace plugin Jan 14, 2026
@tsautier tsautier changed the title Add path-based filtering to AutoFreeSpace plugin Fixes #58: Add path-based filtering to AutoFreeSpace plugin Jan 14, 2026
@tsautier tsautier force-pushed the fix/issue-58 branch 2 times, most recently from 183f741 to af1fffa Compare January 14, 2026 19:39
@tsautier tsautier changed the title Fixes #58: Add path-based filtering to AutoFreeSpace plugin Add path-based filtering to AutoFreeSpace plugin Jan 14, 2026
- Added path field to AutoFreeSpaceSettings.Section
- Updated AutoFreeSpaceSettings.reload() to support X.path=<pattern>
- Modified AutoFreeSpace.getOldestRelease() to iterate over path patterns
- Added findDirectoryForPath() helper with basic wildcard support
- Updated autofreespace.conf.dist with example path configuration
@tsautier
Copy link
Copy Markdown
Author

@mvangoor @hrxcodes for review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Plugin : add some new in autofreespace plugin

1 participant