PDA

View Full Version : I Don’t Like “Errors” In the Log


csd214
09-15-2005, 11:14 AM
[v6.0.4.0]

[09/15/2005 15:37:44] Error Script: Select Install Folder > On Ctrl Message, [269]: local nFreeSpace = Drive.GetFreeSpace(strDrive); (2101)


This “error” is logged when I am going to change “C:\Program Files\My Product” to “D:\Program Files\My Product”. If I highlight the “C” and enters “D”, it is OK. If I delete “C” and enter “D”, the log error appears.

Sugestion: Add three lines to function g_GetFreeSpaceInBytes in _SUF70_Global_Functions.lua.


function g_GetFreeSpaceInBytes(strDrive)
if not(g_IsValidPath(strInstallFolderPath)) then
return 0
end

local nFreeSpace = Drive.GetFreeSpace(strDrive);
if(nFreeSpace ~= -1) then
-- convert from MB to bytes
nFreeSpace = nFreeSpace * 1024 * 1024;
else
nFreeSpace = 0;
end
return nFreeSpace;
end


In any case it is not possible to leave the screen with an invalid AppFolder path.