mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	Do not allow FileSystemStorage.delete to receive an empty name
Refs #20660.
This commit is contained in:
		| @@ -231,6 +231,7 @@ class FileSystemStorage(Storage): | ||||
|         return name | ||||
|  | ||||
|     def delete(self, name): | ||||
|         assert name, "The name argument is not allowed to be empty." | ||||
|         name = self.path(name) | ||||
|         # If the file exists, delete it from the filesystem. | ||||
|         # Note that there is a race between os.path.exists and os.remove: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user