Tuesday, May 26, 2009

Patch - results not saved

I've sent a patch to Jean-Philippe, it fixes TORCS-NG's faulty behaviour not saving the results file if the directory structure to hold it was not created yet. I made the patch against the sdl-port branch, AFAIK the trunk is expected to be released soon.

The cause is plain simple, saving the XML file (GfParmWriteFile) uses fopen() and fopen isn't expected to create the directories. However I think the directory path should have been created when first running the program...
Well the patch fixes the fault explicitly creating the directories in the path if they do not exist. I've tested it under Linux but can't test it under Windows.

Scanning the TODO file a similar error is still there, not saving screenshots when the directories are not created yet. I'll look at it, this may be the same problem.

No comments:

Post a Comment