diff --git a/list_directory.py b/list_directory.py index cfe9ee8..ed6e948 100755 --- a/list_directory.py +++ b/list_directory.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # cryptomator-utils: Python utilities for inspecting Cryptomator drives -# Copyright (C) 2024 Lee Yingtong Li (RunasSudo) +# Copyright (C) 2024-2025 Lee Yingtong Li (RunasSudo) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by @@ -30,7 +30,7 @@ def main(): # Parse CLI arguments vault_config_path = sys.argv[1] - target_directory = sys.argv[2] + target_file = sys.argv[2] vault_path = os.path.split(vault_config_path)[0] @@ -38,8 +38,8 @@ def main(): primary_master_key, hmac_master_key = load_vault_config(vault_config_path) # Resolve the target directory - target_directory_parts = target_directory.strip('/').split('/') - directory_id = directory_path_to_id(vault_path, primary_master_key, hmac_master_key, '/'.join(target_directory_parts)) + target_file_parts = target_file.strip('/').split('/') + directory_id = directory_path_to_id(vault_path, primary_master_key, hmac_master_key, '/'.join(target_file_parts)) # Print directory listing for filename in sorted(list_directory(vault_path, primary_master_key, hmac_master_key, directory_id)):