Refactor variable name for clarity
This commit is contained in:
parent
3ffc7d45b9
commit
28810957c4
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
# cryptomator-utils: Python utilities for inspecting Cryptomator drives
|
# 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
|
# 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
|
# it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -30,7 +30,7 @@ def main():
|
|||||||
|
|
||||||
# Parse CLI arguments
|
# Parse CLI arguments
|
||||||
vault_config_path = sys.argv[1]
|
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]
|
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)
|
primary_master_key, hmac_master_key = load_vault_config(vault_config_path)
|
||||||
|
|
||||||
# Resolve the target directory
|
# Resolve the target directory
|
||||||
target_directory_parts = target_directory.strip('/').split('/')
|
target_file_parts = target_file.strip('/').split('/')
|
||||||
directory_id = directory_path_to_id(vault_path, primary_master_key, hmac_master_key, '/'.join(target_directory_parts))
|
directory_id = directory_path_to_id(vault_path, primary_master_key, hmac_master_key, '/'.join(target_file_parts))
|
||||||
|
|
||||||
# Print directory listing
|
# Print directory listing
|
||||||
for filename in sorted(list_directory(vault_path, primary_master_key, hmac_master_key, directory_id)):
|
for filename in sorted(list_directory(vault_path, primary_master_key, hmac_master_key, directory_id)):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user