From 394bc9f6283915c8bf91787a865201e922bce4f6 Mon Sep 17 00:00:00 2001 From: Martin Fuchs Date: Sun, 1 Feb 2004 11:53:11 +0000 Subject: [PATCH] display pseudo-file attributes "link" and "executable" svn path=/trunk/; revision=7957 --- reactos/subsys/system/explorer/shell/pane.cpp | 4 +++- reactos/subsys/system/explorer/shell/regfs.cpp | 2 +- reactos/subsys/system/explorer/shell/shellfs.cpp | 7 ++++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/reactos/subsys/system/explorer/shell/pane.cpp b/reactos/subsys/system/explorer/shell/pane.cpp index 7559648fce7..6ccc7f660c5 100644 --- a/reactos/subsys/system/explorer/shell/pane.cpp +++ b/reactos/subsys/system/explorer/shell/pane.cpp @@ -560,7 +560,7 @@ void Pane::draw_item(LPDRAWITEMSTRUCT dis, Entry* entry, int calcWidthCol) // show file attributes if (visible_cols & COL_ATTRIBUTES) { - lstrcpy(buffer, TEXT(" \t \t \t \t \t \t \t \t \t \t \t ")); + lstrcpy(buffer, TEXT(" \t \t \t \t \t \t \t \t \t \t \t \t \t \t ")); if (attrs & FILE_ATTRIBUTE_NORMAL) buffer[ 0] = 'N'; else { @@ -576,6 +576,8 @@ void Pane::draw_item(LPDRAWITEMSTRUCT dis, Entry* entry, int calcWidthCol) if (attrs & FILE_ATTRIBUTE_REPARSE_POINT) buffer[20] = 'Q'; if (attrs & FILE_ATTRIBUTE_OFFLINE) buffer[22] = 'O'; if (attrs & FILE_ATTRIBUTE_NOT_CONTENT_INDEXED) buffer[24] = 'X'; + if (attrs & ATTRIBUTE_EXECUTABLE) buffer[26] = 'x'; + if (attrs & ATTRIBUTE_SYMBOLIC_LINK) buffer[28] = 'L'; } if (calcWidthCol == -1) diff --git a/reactos/subsys/system/explorer/shell/regfs.cpp b/reactos/subsys/system/explorer/shell/regfs.cpp index 698a566d9cc..a9eb9fbbf47 100644 --- a/reactos/subsys/system/explorer/shell/regfs.cpp +++ b/reactos/subsys/system/explorer/shell/regfs.cpp @@ -156,7 +156,7 @@ void RegDirectory::read_directory(int scan_flags) DWORD value_len = sizeof(value); if (!RegQueryValueEx(hKey, name, NULL, NULL, (LPBYTE)value, &value_len)) { - if (type==REG_SZ || type==REG_EXPAND_SZ) + if (type==REG_SZ || type==REG_EXPAND_SZ || type==REG_LINK) entry->_content = _tcsdup(value); else if (type == REG_DWORD) { TCHAR b[32]; diff --git a/reactos/subsys/system/explorer/shell/shellfs.cpp b/reactos/subsys/system/explorer/shell/shellfs.cpp index 593bf5bfab3..719d2da38f4 100644 --- a/reactos/subsys/system/explorer/shell/shellfs.cpp +++ b/reactos/subsys/system/explorer/shell/shellfs.cpp @@ -299,8 +299,10 @@ void ShellDirectory::read_directory(int scan_flags) if (w32fd.dwFileAttributes & FILE_ATTRIBUTE_COMPRESSED) attribs |= SFGAO_COMPRESSED; - if (ext && !_tcsicmp(ext, _T(".lnk"))) + if (ext && !_tcsicmp(ext, _T(".lnk"))) { attribs |= SFGAO_LINK; + w32fd.dwFileAttributes |= ATTRIBUTE_SYMBOLIC_LINK; + } entry->_shell_attribs = attribs; @@ -395,6 +397,9 @@ void ShellDirectory::read_directory(int scan_flags) entry->_display_name = _tcsdup(name); // store display name separate from file name; sort display by file name } + if (attribs & SFGAO_LINK) + w32fd.dwFileAttributes |= ATTRIBUTE_SYMBOLIC_LINK; + entry->_down = NULL; entry->_expanded = false; entry->_scanned = false;