Fix handling of files to delete during delete Gallery operation (#5213)

* Only remove file in zip from image if deleting from zip file
* Only remove file in folder from image if deleting from folder
This commit is contained in:
WithoutPants
2024-09-05 11:27:31 +10:00
committed by GitHub
parent 7a2e59fcef
commit ad17e7defe
8 changed files with 136 additions and 99 deletions

View File

@@ -638,6 +638,20 @@ func (_m *ImageReaderWriter) QueryCount(ctx context.Context, imageFilter *models
return r0, r1
}
// RemoveFileID provides a mock function with given fields: ctx, id, fileID
func (_m *ImageReaderWriter) RemoveFileID(ctx context.Context, id int, fileID models.FileID) error {
ret := _m.Called(ctx, id, fileID)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, int, models.FileID) error); ok {
r0 = rf(ctx, id, fileID)
} else {
r0 = ret.Error(0)
}
return r0
}
// ResetOCounter provides a mock function with given fields: ctx, id
func (_m *ImageReaderWriter) ResetOCounter(ctx context.Context, id int) (int, error) {
ret := _m.Called(ctx, id)