the reason for this behavior is that ScriptCommunicator combines the script path with the first argument of checkFileExists if the second argument ist empty or true.
For example:
Your script path is C:\folder\script.js, the first argument of checkFileExists is "" and the second argument of checkFileExists is true then ScriptCommunicator check if the path C:\folder exists. The Qt function QFileInfo::exists() returns then true.
If the second argument in checkFileExists is false then ScriptCommunicator don't combines the script path with the first argument of checkFileExists and there for ScriptCommunicator calls QFileInfo::exists() with an empty string, which returns false.
I'm not sure if I shall change this behavior.
Thx for posting your observations.
Last edit: Stefan Zieker 2018-10-22
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
if the file patch is empty, the function returns a bad result
checkFileExists( '') return true
checkFileExists( '', true) return true
checkFileExists( '', false) return false
Hi,
the reason for this behavior is that ScriptCommunicator combines the script path with the first argument of checkFileExists if the second argument ist empty or true.
For example:
Your script path is C:\folder\script.js, the first argument of checkFileExists is "" and the second argument of checkFileExists is true then ScriptCommunicator check if the path C:\folder exists. The Qt function QFileInfo::exists() returns then true.
If the second argument in checkFileExists is false then ScriptCommunicator don't combines the script path with the first argument of checkFileExists and there for ScriptCommunicator calls QFileInfo::exists() with an empty string, which returns false.
I'm not sure if I shall change this behavior.
Thx for posting your observations.
Last edit: Stefan Zieker 2018-10-22