ID:1488412
 
Code:
    _init()
var/file[] = world.Export(SCRIPTS + "SM_CONFIG.XML")
if(!file)
world.log<<"SMUpdater: Could not contact main server."
return
world.log << "SMUpdater: Configuration file reached."
var/F = file["CONTENT"]
if(!F||!isfile(F))
world.log<<"SMUpdater: Failed to retrieve configuration file."
return
var/check = fcopy(F,"scripts/SM_CONFIG.XML")
if(check)
world.log<<"SMUpdater: File was successfuly gathered."
else world.log<<"SMUpdater: File couldn't be downloaded, attempting to online-read it."
var/XML/Element/config = xmlRootFromFile(check ? "scripts/SM_CONFIG.XML" : F)
var/attributes = config.Attributes("updater")
Host = attributes["host"]
FileDir = attributes["lastversion"]
filename = attributes["filename"]
GameController.AddEventCycleReceiver(src)

if(world.params)
PastUpdates += world.params["updated"]


Problem description: Everything was working as perfect as expected, when suddenly fcopy() started to fail and copy blank files instead of the expected content.

Don't tell me it is due to world.Export() not retrieving it correctly, because it has always did it correctly, unless there's somethin am not aware of.
did you try checking whats inside F before you use fcopy? I would backtrack to the point of failure.
I tried to output what F contained with:
world.log<<"[F]"

Output was "SM_CONFIG.XML"
I may need to do higher testing with it, thing is it just works fine when I download .dmb and .rsc files, and it worked fine with this config as well, uhmm.... It is kind of strange.
is there an address you're supposed to be sending world.Export to, or is that address contained in SCRIPTS with "SM_CONFIG.XML" appended to the end?