Fixed issue where modular computers files were getting erroneously garbage collected after being edited.

This commit is contained in:
Andrew O'Rourke
2017-08-10 20:24:16 +01:00
parent 14a60a23e7
commit b12e5cb296
@@ -152,6 +152,7 @@
if(F)
var/datum/computer_file/data/backup = F.clone()
HDD.remove_file(F)
F = backup.clone() //When the file gets removed from the HDD, it gets queued for garbage collection. Hacky fix is to make a copy.
F.stored_data = newtext
F.calculate_size()
// We can't store the updated file, it's probably too large. Print an error and restore backed up version.