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

Why GeoLite2 placed in %APPDATA%? #2438

Open
henrypp opened this issue Mar 3, 2025 · 4 comments
Open

Why GeoLite2 placed in %APPDATA%? #2438

henrypp opened this issue Mar 3, 2025 · 4 comments

Comments

@henrypp
Copy link
Contributor

henrypp commented Mar 3, 2025

Brief description of your issue

I use portable System Informer, it should placed in application directory!

Steps to reproduce (optional)

No response

Expected behavior (optional)

No response

Actual behavior (optional)

No response

Environment (optional)

SI: every
@Vasilich
Copy link

Vasilich commented Mar 3, 2025

It is placed in app directory if SystemInformer.exe.settings.xml is present in app directory.
How have you configured SI to be portable?

@henrypp
Copy link
Contributor Author

henrypp commented Mar 3, 2025

@Vasilich

ofc, just placed .settings in app directory

@henrypp
Copy link
Contributor Author

henrypp commented Mar 3, 2025

how it confirigure path:

dbpath = PhGetApplicationDataFileName(&GeoDbCityFileName, TRUE);

@henrypp
Copy link
Contributor Author

henrypp commented Mar 3, 2025

and there is memory leak:

PPH_STRING PhGetApplicationDirectoryFileName(
    _In_ PCPH_STRINGREF FileName,
    _In_ BOOLEAN NativeFileName
    )
{
    PPH_STRING applicationFileName = NULL;
    PPH_STRING applicationDirectory;

    if (NativeFileName)
        applicationDirectory = PhGetApplicationDirectory();
    else
        applicationDirectory = PhGetApplicationDirectoryWin32();

    if (applicationDirectory)
    {
        applicationFileName = PhConcatStringRef2(&applicationDirectory->sr, FileName);
        PhReferenceObject(applicationDirectory); // THERE IS DEREFERENCE REQUIRED, NOT REFERENCE!
    }

    return applicationFileName;
}

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

No branches or pull requests

2 participants