mirror of
				https://github.com/mail-in-a-box/mailinabox.git
				synced 2025-10-30 18:50:53 +00:00 
			
		
		
		
	Merge pull request #512 from ponychicken/backup-fixes
S3 backups fail if no prefix is used
This commit is contained in:
		
						commit
						fc536b6ff3
					
				| @ -329,6 +329,11 @@ def list_target_files(config): | |||||||
| 
 | 
 | ||||||
| 		bucket = p.path[1:].split('/')[0] | 		bucket = p.path[1:].split('/')[0] | ||||||
| 		path = '/'.join(p.path[1:].split('/')[1:]) + '/' | 		path = '/'.join(p.path[1:].split('/')[1:]) + '/' | ||||||
|  | 
 | ||||||
|  | 		# If no prefix is specified, set the path to '', otherwise boto won't list the files | ||||||
|  | 		if path == '/': | ||||||
|  | 			path = '' | ||||||
|  | 
 | ||||||
| 		if bucket == "": | 		if bucket == "": | ||||||
| 			raise ValueError("Enter an S3 bucket name.") | 			raise ValueError("Enter an S3 bucket name.") | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user