From 100bb3a571aeefb51e986a4ce49acea746f4ba78 Mon Sep 17 00:00:00 2001 From: James Turner Date: Fri, 15 Jun 2018 11:08:53 +0100 Subject: [PATCH] Fix flags passed to SHGetKnownFolderPath Custom folder locations were not being picked up. Fixes: https://sourceforge.net/p/flightgear/codetickets/2019/ --- simgear/misc/sg_path.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simgear/misc/sg_path.cxx b/simgear/misc/sg_path.cxx index bbb6a894..3d0e41b1 100644 --- a/simgear/misc/sg_path.cxx +++ b/simgear/misc/sg_path.cxx @@ -107,7 +107,7 @@ static SGPath pathForKnownFolder(REFKNOWNFOLDERID folderId, const SGPath& def) // system call will allocate dynamic memory... which we must release when done wchar_t* localFolder = 0; - if (pSHGetKnownFolderPath(folderId, KF_FLAG_DEFAULT_PATH, NULL, &localFolder) == S_OK) { + if (pSHGetKnownFolderPath(folderId, KF_FLAG_DONT_VERIFY, NULL, &localFolder) == S_OK) { SGPath folder_path = SGPath(localFolder, def.getPermissionChecker()); // release dynamic memory CoTaskMemFree(static_cast(localFolder));