Skip to content

Commit 3beeb4f

Browse files
Merge pull request #62 from marcio-pessoa/marcio-pessoa/issue61
Failed to copy with origin absolute path
2 parents bef6415 + e8b7765 commit 3beeb4f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

kubectl-cp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ class FileSystem(Enum):
4646
class Main:
4747
""" Main class """
4848

49-
__version__ = '0.2.6-106'
50-
__date__ = '2024-04-19'
49+
__version__ = '0.2.7-119'
50+
__date__ = '2024-07-05'
5151
__name = 'kubectl-cp'
5252

5353
def __init__(self):
@@ -341,9 +341,9 @@ class Copy:
341341
log.debug(' Command: %s', cmd)
342342
try:
343343
subprocess.run(shlex.split(cmd),
344-
check=True, capture_output=True)
344+
check=True, capture_output=False)
345345
except subprocess.CalledProcessError:
346-
log.critical(' Failed to create directory')
346+
log.critical('Failed to create directory')
347347
return True
348348

349349
for file_name, src_path in zip(files_local, files_full_path):
@@ -378,7 +378,7 @@ class Copy:
378378
def __join_paths(self, base_path: str, files: list[str]) -> list[str]:
379379
result: list[str] = []
380380
for i in files:
381-
result.append(os.path.join(base_path, i))
381+
result.append(os.path.normpath(f'{base_path}{i}'))
382382
return result
383383

384384
def __list_local_directory_recursively(self, path: str) \

0 commit comments

Comments
 (0)