mirror of
https://github.com/reactos/reactos.git
synced 2024-10-02 07:26:47 +00:00
[SHELL32]
The desktop.ini file is only meant to be read if the folder has the R (read-only) or S (system) attributes. If this causes your favorite folder to stop showing the icon, use "attrib +r <foldername>" or edit it from the properties dialog. When we add the desktop.ini files, we will also need to add the R attribute to their respective folders. Followup to CORE-9002 svn path=/trunk/; revision=68834
This commit is contained in:
parent
4b901b355e
commit
ed7c0959c6
|
@ -34,6 +34,9 @@ static HRESULT getIconLocationForFolder(LPCITEMIDLIST pidl, UINT uFlags,
|
||||||
static const WCHAR iconIndex[] = { 'I', 'c', 'o', 'n', 'I', 'n', 'd', 'e', 'x', 0 };
|
static const WCHAR iconIndex[] = { 'I', 'c', 'o', 'n', 'I', 'n', 'd', 'e', 'x', 0 };
|
||||||
static const WCHAR wszDesktopIni[] = { 'd','e','s','k','t','o','p','.','i','n','i',0 };
|
static const WCHAR wszDesktopIni[] = { 'd','e','s','k','t','o','p','.','i','n','i',0 };
|
||||||
int icon_idx;
|
int icon_idx;
|
||||||
|
|
||||||
|
if (!(uFlags & GIL_DEFAULTICON) && (_ILGetFileAttributes(ILFindLastID(pidl), NULL, 0) & (FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_READONLY)) != 0 )
|
||||||
|
{
|
||||||
WCHAR wszFolderPath[MAX_PATH];
|
WCHAR wszFolderPath[MAX_PATH];
|
||||||
|
|
||||||
if (!SHGetPathFromIDListW(pidl, wszFolderPath))
|
if (!SHGetPathFromIDListW(pidl, wszFolderPath))
|
||||||
|
@ -41,7 +44,7 @@ static HRESULT getIconLocationForFolder(LPCITEMIDLIST pidl, UINT uFlags,
|
||||||
|
|
||||||
PathAppendW(wszFolderPath, wszDesktopIni);
|
PathAppendW(wszFolderPath, wszDesktopIni);
|
||||||
|
|
||||||
if (!(uFlags & GIL_DEFAULTICON) && PathFileExistsW(wszFolderPath))
|
if (PathFileExistsW(wszFolderPath))
|
||||||
{
|
{
|
||||||
WCHAR wszPath[MAX_PATH];
|
WCHAR wszPath[MAX_PATH];
|
||||||
WCHAR wszCLSIDValue[CHARS_IN_GUID];
|
WCHAR wszCLSIDValue[CHARS_IN_GUID];
|
||||||
|
@ -66,6 +69,7 @@ static HRESULT getIconLocationForFolder(LPCITEMIDLIST pidl, UINT uFlags,
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static const WCHAR folder[] = { 'F', 'o', 'l', 'd', 'e', 'r', 0 };
|
static const WCHAR folder[] = { 'F', 'o', 'l', 'd', 'e', 'r', 0 };
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue