nextcloud / nextcloud/server

`occ preview:repair --delete` should not create empty preview folders

Open
#48,659 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop 30-feedback bug feature: previews and thumbnails performance 🚀
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

https://github.com/nextcloud/server/blob/c109ae9437403c5bd17834c2ee53507c1d1f2ad2/core/Command/Preview/Repair.php#L216-L223

Creation should be skipped to speed up the deletion.
I was trying to delete my 65k folders and the command ramped up until ~4d run time. Without the get+newFolder it's ~3days.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open core/Command/Preview/Repair.php around lines 216-223 and trace the occ preview:repair --delete path. Confirm the deletion flow skips creating empty preview folders, then verify that the command still removes the targeted folders without the extra creation work.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.