Game Development Community

FileSize?

by Adam Johnston · in Torque Game Builder · 03/21/2006 (3:24 pm) · 2 replies

I think fileSize is wrong
ConsoleFunction(fileSize, bool, 2, 2, "fileSize(fileName) returns filesize or -1 if no file")
{
   argc;
   Con::expandScriptFilename(scriptFilenameBuffer, sizeof(scriptFilenameBuffer), argv[1]);
   return Platform::getFileSize( scriptFilenameBuffer );
}
I changed to
ConsoleFunction(fileSize, S32, 2, 2, "fileSize(fileName) returns filesize or -1 if no file")
{
   argc;
   Con::expandScriptFilename(scriptFilenameBuffer, sizeof(scriptFilenameBuffer), argv[1]);
   return Platform::getFileSize( scriptFilenameBuffer );
}

#1
04/13/2006 (11:24 am)
Adam,
thanks for this bug find. This has been verified to indeed be wrong. It has been fixed and will be included in the next release.

Cheers,
-Justin
#2
04/15/2006 (5:53 am)
Glad to hear.
I won't need to do this by myself every new release