Infomaniak / desktop-kDrive

:computer: Desktop Syncing Client for kDrive
GNU General Public License v3.0
19 stars 4 forks source link

Kdesktop 1022 change the way we retrieve params db folder on windows #197

Closed herve-er closed 2 months ago

herve-er commented 2 months ago

Description

This pull request aims to improve the way we retrieve the appData path on Windows. Currently, we are using std::filesystem::temp_directory_path() and getting its parent twice. However, this method is not reliable as it uses the TEMP environment variable, which can be modified by the user. In such cases, getting the parent twice will not lead us to the correct path.

Solution

To address this issue, we will now use the Windows API method GetKnownFolder. This method is more reliable as it directly retrieves the appData path.

Additional Changes

Checklist:

sonarcloud[bot] commented 2 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud