| 1277 | |
| 1278 | #ifdef WIN32 |
| 1279 | fs::path GetSpecialFolderPath(int nFolder, bool fCreate) |
| 1280 | { |
| 1281 | WCHAR pszPath[MAX_PATH] = L""; |
| 1282 | |
| 1283 | if(SHGetSpecialFolderPathW(nullptr, pszPath, nFolder, fCreate)) |
| 1284 | { |
| 1285 | return fs::path(pszPath); |
| 1286 | } |
| 1287 | |
| 1288 | LogPrintf("SHGetSpecialFolderPathW() failed, could not obtain requested path.\n"); |
| 1289 | return fs::path(""); |
| 1290 | } |
| 1291 | #endif |
| 1292 | |
| 1293 | #ifndef WIN32 |
no test coverage detected