Fixing KeyError when copying multiple keys (SourceForge bug 3091912)
| ... | ... |
@@ -1,4 +1,4 @@ |
| 1 |
-#!/usr/bin/env python |
|
| 1 |
+#!/usr/bin/python |
|
| 2 | 2 |
|
| 3 | 3 |
## Amazon S3 manager |
| 4 | 4 |
## Author: Michal Ludvig <michal@logix.cz> |
| ... | ... |
@@ -509,11 +509,11 @@ def subcmd_cp_mv(args, process_fce, action_str, message): |
| 509 | 509 |
for key in remote_list: |
| 510 | 510 |
remote_list[key]['dest_name'] = destination_base + key |
| 511 | 511 |
else: |
| 512 |
- key = remote_list.keys()[0] |
|
| 513 |
- if destination_base.endswith("/"):
|
|
| 514 |
- remote_list[key]['dest_name'] = destination_base + key |
|
| 515 |
- else: |
|
| 516 |
- remote_list[key]['dest_name'] = destination_base |
|
| 512 |
+ for key in remote_list: |
|
| 513 |
+ if destination_base.endswith("/"):
|
|
| 514 |
+ remote_list[key]['dest_name'] = destination_base + key |
|
| 515 |
+ else: |
|
| 516 |
+ remote_list[key]['dest_name'] = destination_base |
|
| 517 | 517 |
|
| 518 | 518 |
if cfg.dry_run: |
| 519 | 519 |
for key in exclude_list: |