display pseudo-file attributes "link" and "executable"

svn path=/trunk/; revision=7957
This commit is contained in:
Martin Fuchs 2004-02-01 11:53:11 +00:00
parent 257d7fb7f0
commit 394bc9f628
3 changed files with 10 additions and 3 deletions

View file

@ -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)

View file

@ -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];

View file

@ -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;