cleaning up left over bz2 files

This commit is contained in:
jenz 2023-02-22 19:12:58 +01:00
parent e058788ad0
commit 1ae8fdfb66

View File

@ -141,6 +141,8 @@ if __name__ == '__main__':
external_port_messages = data_ports['chat_external_port'] external_port_messages = data_ports['chat_external_port']
buffer_size = 4096 #potentially not large enough? buffer_size = 4096 #potentially not large enough?
connection_issue_counter = 0; connection_issue_counter = 0;
#deleting left over bz2 files because they give missing map issue
subprocess.run([f"rm /home/{whoami}/.var/app/com.valvesoftware.Steam/data/Steam/steamapps/common/Counter-Strike\ Source/cstrike/download/maps/*.bz2"], shell=True)
#deleting maps #deleting maps
maps_folder_size = subprocess.Popen(["du", "-sh", f"/home/{whoami}/.var/app/com.valvesoftware.Steam/data/Steam/steamapps/common/Counter-Strike Source/cstrike/download/maps"], stdout=subprocess.PIPE).communicate()[0].decode().split("\t")[0] maps_folder_size = subprocess.Popen(["du", "-sh", f"/home/{whoami}/.var/app/com.valvesoftware.Steam/data/Steam/steamapps/common/Counter-Strike Source/cstrike/download/maps"], stdout=subprocess.PIPE).communicate()[0].decode().split("\t")[0]
#deleting when maps folder larger than 150GB #deleting when maps folder larger than 150GB