TempPatchFile := SysUtils.GetTempFilename(GetTempDir(false), 'pmg'); //Note: SysUtils.GetTempFileName('','') doesn't seem to work!?!? if TempPatchFile = '' then begin {$IFDEF DEBUG} FLog.Add('Debug: FindCandidates: GetTempFileName failed; IOResult: '+inttostr(IOResult)); {$ENDIF DEBUG} {$IFDEF UNIX} TempPatchFile:='/tmp/pw'+Chr(97+(Random(25)))+Chr(97+(Random(25)))+Chr(97+(Random(25))); {$ELSE} FLog.Add('Could not get temporary file. Aborting'); Exit(false); {$ENDIF UNIX} end; Assert(TempPatchFile<>'', 'Sysutils.GetTempFileName must return a file name'); //seems to be a problem on Linux!??!
Could not get temporary file. Aborting
TempPatchFile := SysUtils.GetTempFilename(ExcludeTrailingPathDelimiter(GetTempDir(false)), 'pmg');
TempPatchFile := SysUtils.GetTempFilename('', 'pmg');