1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2024-11-22 02:17:26 +00:00

If no prefix is specified, set the path to '', otherwise boto won't list the files

This commit is contained in:
Leo Koppelkamm 2015-08-11 13:54:30 +02:00
parent f4e8ee0af9
commit f96bef43cc

View File

@ -329,6 +329,11 @@ def list_target_files(config):
bucket = p.path[1:].split('/')[0]
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 == "":
raise ValueError("Enter an S3 bucket name.")