fixed comparison and download on encrypted files. delete 0kb files after os.rename (may be a bug)

This commit is contained in:
2015-12-03 10:29:01 +01:00
parent 0fee56afd0
commit a68470dcac
3 changed files with 27 additions and 15 deletions

View File

@@ -113,8 +113,11 @@ def list_compute_correct_names_for_enctyption (objects,prefix):
encrypted_name_only = full.split("_xg10v10_")[0] + "_xg10v10_encrypted"
else:
encrypted_name_only = full
remotefiles[encrypted_name_only] = full
if encrypted_name_only in remotefiles.keys():
if int(remotefiles[encrypted_name_only].split("_xg10v10_")[3]) < int(full.split("_xg10v10_")[3]) :
remotefiles[encrypted_name_only] = full
else:
remotefiles[encrypted_name_only] = full
return remotefiles