mirror of
				https://github.com/minio/minio.git
				synced 2025-10-29 15:55:00 -04:00 
			
		
		
		
	preserve conflicting objects when parent object is being deleted (#19034)
a/prefix a/prefix/1.txt where `a/prefix` is an object which does not have `/` at the end, we do not have to aggressively recursively delete all the sub-folders as well. Instead convert the call into self contained to deleting 'xl.meta' and then subsequently attempting to Remove the parent.
This commit is contained in:
		
							parent
							
								
									afd19de5a9
								
							
						
					
					
						commit
						0e177a44e0
					
				| @ -1146,7 +1146,7 @@ func (s *xlStorage) deleteVersions(ctx context.Context, volume, path string, fis | ||||
| 		return s.WriteAll(ctx, volume, pathJoin(path, xlStorageFormatFile), buf) | ||||
| 	} | ||||
| 
 | ||||
| 	return s.deleteFile(volumeDir, pathJoin(volumeDir, path), true, false) | ||||
| 	return s.deleteFile(volumeDir, pathJoin(volumeDir, path, xlStorageFormatFile), true, false) | ||||
| } | ||||
| 
 | ||||
| // DeleteVersions deletes slice of versions, it can be same object | ||||
| @ -1307,7 +1307,7 @@ func (s *xlStorage) DeleteVersion(ctx context.Context, volume, path string, fi F | ||||
| 		return s.WriteAll(ctx, volume, pathJoin(path, xlStorageFormatFile), buf) | ||||
| 	} | ||||
| 
 | ||||
| 	return s.deleteFile(volumeDir, filePath, true, false) | ||||
| 	return s.deleteFile(volumeDir, pathJoin(volumeDir, path, xlStorageFormatFile), true, false) | ||||
| } | ||||
| 
 | ||||
| // Updates only metadata for a given version. | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user