Changeset 164 for trunk/Target.pas


Ignore:
Timestamp:
Aug 20, 2024, 1:01:48 AM (3 months ago)
Author:
chronos
Message:
  • Fixed: Put compiled files into application data directory if source is in read only directory.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Target.pas

    r161 r164  
    533533    CompiledDir + DirectorySeparator + Name + DirectorySeparator +
    534534    ExtractFileNameOnly(ProjectFileName) + SourceExtension;
     535  if not DirectoryIsWritable(ExtractFilePath(Result)) then
     536    Result := GetAppConfigDir(False) + CompiledDir + DirectorySeparator + Name +
     537      DirectorySeparator + ExtractFileNameOnly(ProjectFileName) + SourceExtension;;
    535538end;
    536539
     
    545548    CompiledDir + DirectorySeparator + Name + DirectorySeparator +
    546549    ExtractFileNameOnly(ProjectFileName) + CompiledExtension;
     550  if not DirectoryIsWritable(ExtractFilePath(Result)) then
     551    Result := GetAppConfigDir(False) + CompiledDir + DirectorySeparator + Name +
     552      DirectorySeparator + ExtractFileNameOnly(ProjectFileName) + CompiledExtension;
    547553end;
    548554
Note: See TracChangeset for help on using the changeset viewer.