514.1589, stable as time of writing.
As title explains, calling client.Export() will not delete, not even empty the file at least.
Numbered Steps to Reproduce Problem:
1. Export a savefile with some data on it.
2. Import it to see that everything's fine.
3. Call client.Export().
4. Import it and see that nothing has changed, the savefile still contains data/exists.
Code Snippet (if applicable) to Reproduce Problem:
/world/hub = "Exadv1.spacestation13"
set name = "get savefile"
var/savefile/S = new(Import())
var/txtfile = file("test.txt")
set name = "empty savefile"
set name = "create savefile"
var/savefile/S = new()
S["deleted"] << 1
A file deletion.
Does the problem occur:
Every time? Or how often?
In other games?
Quite possibly? The example contains a snippet that will show that it fails even at an empty environment.
In other user accounts?
On other computers?
When does the problem NOT occur?
There is no situation where the problem does not occur, at most you can clear the file by using the (create_savefile()) on the example.
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
I am not aware whether this proc has worked the correct way before.
Perform as the example (create_savefile()) does, it will not delete the file, but at least it will clear it for you.