https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0a626dedf8be5e5f2c08b…
commit 0a626dedf8be5e5f2c08ba664b91558245dafec6
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Tue Feb 25 10:07:58 2020 +0900
Commit: GitHub <noreply(a)github.com>
CommitDate: Tue Feb 25 10:07:58 2020 +0900
[SHELL32] Set read-only for some shell folders and delete Desktop.ini of Desktop and
Program Files (#2385)
Set read-only attribute instead of system attribute for some shell folders that has a
folder icon.
Delete desktop.ini files in Desktop and Program Files. CORE-16711
---
dll/win32/shell32/wine/shellpath.c | 28 ++++++++++++++++++++++++++--
1 file changed, 26 insertions(+), 2 deletions(-)
diff --git a/dll/win32/shell32/wine/shellpath.c b/dll/win32/shell32/wine/shellpath.c
index b65b37438d5..17a6877edad 100644
--- a/dll/win32/shell32/wine/shellpath.c
+++ b/dll/win32/shell32/wine/shellpath.c
@@ -734,7 +734,11 @@ static const CSIDL_DATA CSIDL_Data[] =
CSIDL_Type_User,
DesktopW,
MAKEINTRESOURCEW(IDS_DESKTOPDIRECTORY),
+#ifdef __REACTOS__
+ 0
+#else
-IDI_SHELL_DESKTOP
+#endif
},
{ /* 0x01 - CSIDL_INTERNET */
&FOLDERID_InternetFolder,
@@ -747,7 +751,11 @@ static const CSIDL_DATA CSIDL_Data[] =
CSIDL_Type_User,
ProgramsW,
MAKEINTRESOURCEW(IDS_PROGRAMS),
+#ifdef __REACTOS__
+ 0
+#else
-IDI_SHELL_PROGRAMS_FOLDER
+#endif
},
{ /* 0x03 - CSIDL_CONTROLS (.CPL files) */
&FOLDERID_ControlPanelFolder,
@@ -849,7 +857,11 @@ static const CSIDL_DATA CSIDL_Data[] =
CSIDL_Type_User,
DesktopW,
MAKEINTRESOURCEW(IDS_DESKTOPDIRECTORY),
+#ifdef __REACTOS__
+ 0
+#else
-IDI_SHELL_DESKTOP
+#endif
},
{ /* 0x11 - CSIDL_DRIVES */
&FOLDERID_ComputerFolder,
@@ -897,7 +909,11 @@ static const CSIDL_DATA CSIDL_Data[] =
CSIDL_Type_AllUsers,
Common_ProgramsW,
MAKEINTRESOURCEW(IDS_PROGRAMS),
+#ifdef __REACTOS__
+ 0
+#else
-IDI_SHELL_PROGRAMS_FOLDER
+#endif
},
{ /* 0x18 - CSIDL_COMMON_STARTUP */
&FOLDERID_CommonStartup,
@@ -910,7 +926,11 @@ static const CSIDL_DATA CSIDL_Data[] =
CSIDL_Type_AllUsers,
Common_DesktopW,
MAKEINTRESOURCEW(IDS_DESKTOPDIRECTORY),
+#ifdef __REACTOS__
+ 0
+#else
-IDI_SHELL_DESKTOP
+#endif
},
{ /* 0x1a - CSIDL_APPDATA */
&FOLDERID_RoamingAppData,
@@ -993,7 +1013,11 @@ static const CSIDL_DATA CSIDL_Data[] =
CSIDL_Type_CurrVer,
ProgramFilesDirW,
MAKEINTRESOURCEW(IDS_PROGRAM_FILES),
+#ifdef __REACTOS__
+ 0
+#else
-IDI_SHELL_PROGRAMS_FOLDER
+#endif
},
{ /* 0x27 - CSIDL_MYPICTURES */
&FOLDERID_Pictures,
@@ -2393,9 +2417,9 @@ end:
WCHAR szIconLocation[MAX_PATH];
DWORD dwAttributes;
- /* make the directory a system folder */
+ /* make the directory a read-only folder */
dwAttributes = GetFileAttributesW(szBuildPath);
- dwAttributes |= FILE_ATTRIBUTE_SYSTEM;
+ dwAttributes |= FILE_ATTRIBUTE_READONLY;
SetFileAttributesW(szBuildPath, dwAttributes);
/* build the desktop.ini file path */