Skip to content

Commit

Permalink
Add a few missing path extractions
Browse files Browse the repository at this point in the history
  • Loading branch information
Kimahriman committed Jan 1, 2025
1 parent b495d8e commit 57fd9fe
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions python/hdfs_native/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ def cat(args: Namespace):
def mkdir(args: Namespace):
create_parent = args.parent

for path in args.path:
client = _client_for_url(path)
client.mkdirs(path, create_parent=create_parent)
for url in args.path:
client = _client_for_url(url)
client.mkdirs(_path_for_url(url), create_parent=create_parent)


def mv(args: Namespace):
Expand All @@ -81,7 +81,9 @@ def mv(args: Namespace):
pass

resolved_src = [
path for pattern in args.src for path in _glob_path(client, pattern)
path
for pattern in args.src
for path in _glob_path(client, _path_for_url(pattern))
]

if len(resolved_src) > 1 and not dst_isdir:
Expand Down

0 comments on commit 57fd9fe

Please sign in to comment.