Skip to content

Commit 57fd9fe

Browse files
committed
Add a few missing path extractions
1 parent b495d8e commit 57fd9fe

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

python/hdfs_native/cli.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ def cat(args: Namespace):
6363
def mkdir(args: Namespace):
6464
create_parent = args.parent
6565

66-
for path in args.path:
67-
client = _client_for_url(path)
68-
client.mkdirs(path, create_parent=create_parent)
66+
for url in args.path:
67+
client = _client_for_url(url)
68+
client.mkdirs(_path_for_url(url), create_parent=create_parent)
6969

7070

7171
def mv(args: Namespace):
@@ -81,7 +81,9 @@ def mv(args: Namespace):
8181
pass
8282

8383
resolved_src = [
84-
path for pattern in args.src for path in _glob_path(client, pattern)
84+
path
85+
for pattern in args.src
86+
for path in _glob_path(client, _path_for_url(pattern))
8587
]
8688

8789
if len(resolved_src) > 1 and not dst_isdir:

0 commit comments

Comments
 (0)