Empty directories building up in the `preview` folder.
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
This should delete empty preview directories as well.
After running a few weeks with automatic ZFS snapshots folder attached as a history (It was a bad idea),
I've got a monstrous directory structure and the cron scan constantly utilized my disk for several days(SELECT-UPDATE on the oc_filecache table).
files:cleanup didn't do anything, 0 orphaned files.
files:scan-app-data took almost 6 hours to complete:
+---------+--------+--------------+
| Folders | Files | Elapsed time |
+---------+--------+--------------+
| 5868385 | 151476 | 05:45:49 |
+---------+--------+--------------+
So I'm now deleting empty folders manually with find . -type d -empty -delete in the preview directory.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with lib/private/Preview/BackgroundCleanupJob.php at line 36, where preview cleanup is initiated. Trace the cleanup behavior and verify it against a preview directory containing no files. Done means empty directories under the preview folder are removed as part of cleanup, without requiring manual find commands.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 42/100