Adapt to new server, unlock old versions again

This commit is contained in:
Lixfel
2025-01-17 13:28:57 +01:00
parent 0c815ee1d5
commit eaae2f4009
7 changed files with 26 additions and 24 deletions
+2 -2
View File
@@ -37,11 +37,11 @@ if __name__ == "__main__":
with open(configfile, 'r') as file:
gamemode = yaml.load(file)
builderworld = path.expanduser(f'~/builder{version}/{worldname}')
builderworld = path.expanduser(f'/worlds/builder{version}/{worldname}')
arenaworld = f'/servers/{gamemode["Server"]["Folder"]}/arenas/{worldname}'
if path.exists(arenaworld):
backupworld = path.expanduser(f'~/backup/arenas/{datetime.datetime.now()}-{worldname}-{version}.tar.xz')
backupworld = path.expanduser(f'/mnt/storage/backup/arenas/{datetime.datetime.now()}-{worldname}-{version}.tar.xz')
with tarfile.open(backupworld, 'w:xz') as tar:
tar.add(arenaworld, arcname=worldname)