Author: ashaposhnikov Date: Thu Jun 29 18:57:52 2017 New Revision: 75239
URL: http://svn.reactos.org/svn/reactos?rev=75239&view=rev Log: [RAPPS] Fixed default "Download" folder default. Now defaults to "RAPPS Downloads" folder in user Documents or installation drive.
Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/winmain.cpp
Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/winmain.cpp URL: http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/base/app... ============================================================================== --- branches/GSoC_2017/rapps/reactos/base/applications/rapps/winmain.cpp [iso-8859-1] (original) +++ branches/GSoC_2017/rapps/reactos/base/applications/rapps/winmain.cpp [iso-8859-1] Thu Jun 29 18:57:52 2017 @@ -54,9 +54,16 @@ pSettingsInfo->bSaveWndPos = TRUE; pSettingsInfo->bUpdateAtStart = FALSE; pSettingsInfo->bLogEnabled = TRUE; - StringCbCopyW(pSettingsInfo->szDownloadDir, - sizeof(pSettingsInfo->szDownloadDir), - L"C:\Downloads"); + if (SUCCEEDED(SHGetFolderPathW(NULL, CSIDL_PERSONAL, NULL, SHGFP_TYPE_CURRENT, pSettingsInfo->szDownloadDir))) + { + StringCbCatW(pSettingsInfo->szDownloadDir, _countof(pSettingsInfo->szDownloadDir), L"\RAPPS Downloads"); + } + else + { + ExpandEnvironmentStringsW(L"%SystemDrive%\RAPPS Downloads", + pSettingsInfo->szDownloadDir, _countof(pSettingsInfo->szDownloadDir)); + } + pSettingsInfo->bDelInstaller = FALSE;
pSettingsInfo->Maximized = FALSE;