Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update cache, userdata and log folders RunTime #74

Open
kayaliabd opened this issue Mar 31, 2024 · 3 comments
Open

update cache, userdata and log folders RunTime #74

kayaliabd opened this issue Mar 31, 2024 · 3 comments

Comments

@kayaliabd
Copy link

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
Copy link
Author

kayaliabd commented Mar 31, 2024

`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

@marcelo386
Copy link
Collaborator

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;

@kayaliabd
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants