New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SHELL32] Fix desktop.ini folder icon #595
Conversation
break; | ||
|
||
// read-only or system folder? | ||
const DWORD dwFileAttrs = _ILGetFileAttributes(ILFindLastID(pidl), NULL, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"const" is not needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It also doesnt hurt?
{ | ||
ExpandEnvironmentStringsW(wszPath, szIconFile, cchMax); | ||
// wszTemp --> szIconFile | ||
GetFullPathNameW(wszTemp, cchMax, szIconFile, NULL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to avoid the usage of the thread-unsafe SetCurrentDirectory function?
I was thinking about using some FindFirstFile... but maybe other solutions exist?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PathCombine or something in shlwapi shall be used. I will try to implement it tomorrow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used PathIsRelativeW and PathAppendW. Done.
} | ||
|
||
static const WCHAR folder[] = { 'F', 'o', 'l', 'd', 'e', 'r', 0 }; | ||
} while (0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please avoid that construct in main code. This is part of the few exceptions where the "break;" you have above can be replaced by a "goto Quit;", and a "Quit:" label be used before the "getDefaultIconLocation2 call.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK.
{ | ||
WCHAR wszPath[MAX_PATH]; | ||
WCHAR wszCLSIDValue[CHARS_IN_GUID]; | ||
// build a full path of ini file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"build the full path to the ini file"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK.
To fix this error, you must move the |
Can you test if custom folder icons still work in places other than the desktop? |
You have to modify the file attributes and refresh the view. |
I left a comment here: f8926dc#r29471950 |
Purpose
The folder icon location specified in desktop.ini of a folder should accept its relative path.
JIRA issue: CORE-9196