From 1fb664ef52facea690f5046512fd168f12191ca7 Mon Sep 17 00:00:00 2001 From: Yiming Yang Date: Fri, 6 May 2022 18:18:32 -0400 Subject: [PATCH] bug fix for AWS backend cp --- strato/backends/_aws.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/strato/backends/_aws.py b/strato/backends/_aws.py index dcd6f64..68e9e52 100644 --- a/strato/backends/_aws.py +++ b/strato/backends/_aws.py @@ -1,7 +1,7 @@ import os, shutil import boto3 from subprocess import check_call, CalledProcessError -from typing import Optional + def parse_wildcard(filepath): prefix = "s3://" if filepath.startswith("s3://") else "" @@ -14,6 +14,9 @@ def parse_wildcard(filepath): assert wd_idx != -1, "The given path doesn't contain wildcard!" parent_folder = prefix + '/'.join(fp_list[0:wd_idx]) + if parent_folder == "" and prefix == "": + parent_folder = "." + wildcard = '/'.join(fp_list[wd_idx:]) return parent_folder, wildcard