fixed a minor bug causing files to always get copied to the object directory when using add+file
parent
66aec7ae75
commit
639e3ed9ca
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue