ID:139751
 
Code:
var/asdf = file("a.png"); // File is 6kb
sleep(50); // no timing concern
fcopy(asdf, "a.png"); // File becomes 0kb


Problem description:
The above example code will essentially create a new 'a.png' file. If you give a new name such as b.png, it will save the file. It looks as though, it creates a new file with the provided name (blowing away the old one) and then it attempts to copy the which now points to a new empty file.

Is that by design? I just want to make sure. I've already figured out a design that meets my needs but I might as well make sure it is supposed to work this way.

ts