From: Theodore Dubois <tblodt@icloud.com> Non-folder entries in the shell namespace have no ->folder, so their this would fail to get the path. Instead always look up the attributes using the parent. --- programs/winefile/winefile.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/programs/winefile/winefile.c b/programs/winefile/winefile.c index e37f3371bab..3a33edcce1f 100644 --- a/programs/winefile/winefile.c +++ b/programs/winefile/winefile.c @@ -1129,17 +1129,16 @@ static void get_path(Entry* dir, PWSTR path) { SFGAOF attribs; HRESULT hr = S_OK; + IShellFolder* parent = dir->up? dir->up->folder: Globals.iDesktop; path[0] = '\0'; attribs = 0; - if (dir->folder) - hr = IShellFolder_GetAttributesOf(dir->folder, 1, (LPCITEMIDLIST*)&dir->pidl, &attribs); + parent = dir->up? dir->up->folder: Globals.iDesktop; + hr = IShellFolder_GetAttributesOf(parent, 1, (LPCITEMIDLIST*)&dir->pidl, &attribs); if (SUCCEEDED(hr) && (attribs&SFGAO_FILESYSTEM)) { - IShellFolder* parent = dir->up? dir->up->folder: Globals.iDesktop; - hr = path_from_pidlW(parent, dir->pidl, path, MAX_PATH); } } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/9825