[Patch] Crash with "JEDI Code Formater" if path for "Building Test Projects" is not available.
Original Reporter info from Mantis: delphifreak
-
Reporter name: samuel herzog
Original Reporter info from Mantis: delphifreak
- Reporter name: samuel herzog
Description:
If the path defined in setting "Building Test Projects" does not exist, then the JEDI Code Formater fails to write it's log.
Steps to reproduce:
1.) start Lazarus IDE
2.) "New Project"
3.) choose "Environment"->"Options"
4.) set "Directory for building Test-Projects" to an inexistent value.
5.) close the Options dialog by pressing "OK".
6.) Now run "Tools"->"JEDI Code Formatter".
You will get "Invalid filename". Press "OK" to ignore and risk data corruption"
Additional information:
Problem is here:
procedure TJCFLog.OpenLog;
begin
if not fOpen then
begin
AssignFile(FLog, fsLogFileName);
Rewrite(FLog);
Un-protected file operation. fsLogFileName contains a invalid path.
Mantis conversion info:
- Mantis ID: 18783
- OS: xp
- OS Build: sp3
- Build: Lazarus 0.9.31 r29604 FPC 2.4.3
- Platform: win32
- Version: 0.9.31 (SVN)
- Fixed in version: 0.9.31 (SVN)
- Fixed in revision: 29685 (#577d97a8)
- Target version: 0.9.31 (SVN)