WPP4Delphi icon indicating copy to clipboard operation
WPP4Delphi copied to clipboard

update cache, userdata and log folders RunTime

Open kayaliabd opened this issue 3 months ago • 1 comments

I am working on multi user application and I need to change cache, userdata and log folders in run time but that is not allowed after in run time

kayaliabd avatar Mar 31 '24 00:03 kayaliabd

`procedure TCEFConfig.SetPathCache(const Value: String); begin

     if AnsiLowerCase(FPathCache) = AnsiLowerCase(Value) Then
       Exit;

     ForceDirectories(PWideChar(ExtractFilePath(Value)));
     if not TestaOk(FPathCache, Value) Then     Exit;
           FPathCache            := Value;

end;`

TestaOK return = False

kayaliabd avatar Mar 31 '24 00:03 kayaliabd

PNewValue must be equal to POldValue in this case it returns false

function TCEFConfig.TestaOk(POldValue, PNewValue: String):Boolean; var LDir : String; begin if AnsiLowerCase(POldValue) = AnsiLowerCase(PNewValue) Then Begin Result := False; Exit; End;

LDir := ExtractFilePath(PNewValue); if Self.status = asInitialized then raise Exception.Create(MSG_ConfigCEF_ExceptNotFoundPATH); if not DirectoryExists(LDir) then //raise Exception.Create(Format(MSG_ExceptPath, [LDir])); //Aurino 11/07/2022 deletefile(pwidechar(ExtractFilePath(Application.ExeName) + NomeArquivoIni)) ; Result := true; end;

marcelo386 avatar Apr 11 '24 23:04 marcelo386

yea, I try to disable this line but that did not work, I could not update cash folder path!!!

kayaliabd avatar Apr 12 '24 00:04 kayaliabd