From: Paul Gofman pgofman@codeweavers.com
--- dlls/shell32/shellpath.c | 17 ++++++++++++++++- dlls/shell32/tests/shellpath.c | 9 +++++++++ 2 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/dlls/shell32/shellpath.c b/dlls/shell32/shellpath.c index 2c1072cc8a2..ed6850404d7 100644 --- a/dlls/shell32/shellpath.c +++ b/dlls/shell32/shellpath.c @@ -2085,6 +2085,15 @@ static const CSIDL_DATA CSIDL_Data[] = .attributes = FILE_ATTRIBUTE_READONLY, .flags = KFDF_PRECREATE | KFDF_ROAMABLE, }, + { /* 0x74 */ + .id = &FOLDERID_Screenshots, + .type = CSIDL_Type_User, + .category = KF_CATEGORY_PERUSER, + .name = L"Screenshots", + .parent = &FOLDERID_Pictures, + .path = L"Screenshots", + .flags = KFDF_PRECREATE | KFDF_ROAMABLE, + }, };
static int csidl_from_id( const KNOWNFOLDERID *id ) @@ -3020,7 +3029,8 @@ HRESULT WINAPI SHGetFolderPathAndSubDirW(
/* create symbolic links rather than directories for specific * user shell folders */ - _SHCreateSymbolicLink(folder, szBuildPath); + if (!pszSubPath) + _SHCreateSymbolicLink(folder, szBuildPath);
/* create directory/directories */ ret = SHCreateDirectoryExW(hwndOwner, szBuildPath, NULL); @@ -3296,6 +3306,11 @@ static HRESULT create_extra_folders(void) hr = SHGetFolderPathAndSubDirW(0, CSIDL_APPDATA | CSIDL_FLAG_CREATE, NULL, SHGFP_TYPE_DEFAULT, L"Microsoft\Windows\AccountPictures", path); } + if (SUCCEEDED(hr)) + { + hr = SHGetFolderPathAndSubDirW(0, CSIDL_MYPICTURES | CSIDL_FLAG_CREATE, NULL, + SHGFP_TYPE_DEFAULT, L"Screenshots", path); + } return hr; }
diff --git a/dlls/shell32/tests/shellpath.c b/dlls/shell32/tests/shellpath.c index ae452640c95..3eaace70509 100644 --- a/dlls/shell32/tests/shellpath.c +++ b/dlls/shell32/tests/shellpath.c @@ -1323,6 +1323,15 @@ static const struct knownFolderDef known_folders[] = { NULL, FILE_ATTRIBUTE_READONLY, KFDF_PRECREATE | KFDF_ROAMABLE), + KNOWN_FOLDER(FOLDERID_Screenshots, + NO_CSIDL, + "Screenshots", + KF_CATEGORY_PERUSER, + FOLDERID_Pictures, GUID_NULL, + "Screenshots", + NULL, + 0, + KFDF_PRECREATE | KFDF_ROAMABLE), }; #undef KNOWN_FOLDER BOOL known_folder_found[ARRAY_SIZE(known_folders)];