fixed a minor bug causing files to always get copied to the object directory when using add+file

master
BodgeMaster 2021-12-12 10:10:48 +01:00
parent 66aec7ae75
commit 639e3ed9ca
1 changed files with 2 additions and 2 deletions

View File

@ -310,10 +310,10 @@ if __name__ == "__main__":
if hash_allowed and file_hash_or_path_is_hash(storage_directory, file_hash_or_path, compress):
file_hash = file_hash_or_path
print("File already in storage.")
print("Hash for file in storage: "+file_hash)
else:
file_hash = calculate_file_hash(checksum_algorithm, file_hash_or_path)
if file_hash_or_path_is_hash(storage_directory, file_hash_or_path, compress):
if file_hash_or_path_is_hash(storage_directory, file_hash, compress):
print("File already in storage.")
#this assumes that the storage directory has not been tampered with or corrupted, FIXME!
if 'move' in command: