mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 04:14:39 +03:00
Handle file rescan (#2951)
* Fire handlers when file updated or moved * Create galleries as needed * Clean empty galleries * Handle cleaning zip folders when path changed * Fix gallery association on duplicate images * Re-create missing folder-based galleries
This commit is contained in:
@@ -338,7 +338,9 @@ func (j *cleanJob) shouldCleanFolder(ctx context.Context, f *Folder) bool {
|
||||
path := f.Path
|
||||
|
||||
info, err := f.Info(j.FS)
|
||||
if err != nil && !errors.Is(err, fs.ErrNotExist) {
|
||||
// ErrInvalid can occur in zip files where the zip file path changed
|
||||
// and the underlying folder did not
|
||||
if err != nil && !errors.Is(err, fs.ErrNotExist) && !errors.Is(err, fs.ErrInvalid) {
|
||||
logger.Errorf("error getting folder info for %q, not cleaning: %v", path, err)
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user