solved version bug

This commit is contained in:
Kevin Veen-Birkenbach 2022-03-28 18:14:59 +02:00
parent 7f0c85eb4a
commit fe0ed83dd4

View File

@ -64,8 +64,8 @@ for volume_name in volume_names:
pathlib.Path(files_rsync_destination_path).mkdir(parents=True, exist_ok=True) pathlib.Path(files_rsync_destination_path).mkdir(parents=True, exist_ok=True)
versions = os.listdir(versions_dir_path) versions = os.listdir(versions_dir_path)
versions.sort(reverse=True) versions.sort(reverse=True)
if len(versions) >= 0: if len(versions) > 1:
last_version = versions[0] last_version = versions[1]
last_version_dir_path = versions_dir_path + last_version + "/" + volume_name last_version_dir_path = versions_dir_path + last_version + "/" + volume_name
if os.path.isdir(last_version_dir_path): if os.path.isdir(last_version_dir_path):
link_dest_parameter="--link-dest='" + last_version_dir_path + "' " link_dest_parameter="--link-dest='" + last_version_dir_path + "' "