Skip to content

Commit 5259c30

Browse files
committed
Fix Issues 32147: Add condition checking to avoid infinite loop
1 parent e93d12c commit 5259c30

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • src/azure-cli/azure/cli/command_modules/storage/operations

‎src/azure-cli/azure/cli/command_modules/storage/operations/file.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ def _make_directory_in_files_share(file_service, directory_path, existing_dirs=N
512512

513513
parents = [directory_path]
514514
p = os.path.dirname(directory_path)
515-
while p:
515+
while p and p != parents[-1]:
516516
parents.append(p)
517517
p = os.path.dirname(p)
518518

0 commit comments

Comments
 (0)