mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	add path prefix to ObjectStorage.Iterator (#23332)
Support to iterator subdirectory in ObjectStorage for ObjectStorage.Iterator method. It's required for https://github.com/go-gitea/gitea/pull/22738 to make artifact files cleanable. --------- Co-authored-by: Jason Song <i@wolfogre.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
		@@ -42,7 +42,7 @@ func Test_discardStorage(t *testing.T) {
 | 
			
		||||
				assert.Errorf(t, err, string(tt))
 | 
			
		||||
			}
 | 
			
		||||
			{
 | 
			
		||||
				err := tt.IterateObjects(func(_ string, _ Object) error { return nil })
 | 
			
		||||
				err := tt.IterateObjects("", func(_ string, _ Object) error { return nil })
 | 
			
		||||
				assert.Error(t, err, string(tt))
 | 
			
		||||
			}
 | 
			
		||||
		})
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user