mirror of
https://github.com/reactos/reactos.git
synced 2024-10-04 16:36:11 +00:00
display pseudo-file attributes "link" and "executable"
svn path=/trunk/; revision=7957
This commit is contained in:
parent
257d7fb7f0
commit
394bc9f628
|
@ -560,7 +560,7 @@ void Pane::draw_item(LPDRAWITEMSTRUCT dis, Entry* entry, int calcWidthCol)
|
||||||
|
|
||||||
// show file attributes
|
// show file attributes
|
||||||
if (visible_cols & COL_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';
|
if (attrs & FILE_ATTRIBUTE_NORMAL) buffer[ 0] = 'N';
|
||||||
else {
|
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_REPARSE_POINT) buffer[20] = 'Q';
|
||||||
if (attrs & FILE_ATTRIBUTE_OFFLINE) buffer[22] = 'O';
|
if (attrs & FILE_ATTRIBUTE_OFFLINE) buffer[22] = 'O';
|
||||||
if (attrs & FILE_ATTRIBUTE_NOT_CONTENT_INDEXED) buffer[24] = 'X';
|
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)
|
if (calcWidthCol == -1)
|
||||||
|
|
|
@ -156,7 +156,7 @@ void RegDirectory::read_directory(int scan_flags)
|
||||||
DWORD value_len = sizeof(value);
|
DWORD value_len = sizeof(value);
|
||||||
|
|
||||||
if (!RegQueryValueEx(hKey, name, NULL, NULL, (LPBYTE)value, &value_len)) {
|
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);
|
entry->_content = _tcsdup(value);
|
||||||
else if (type == REG_DWORD) {
|
else if (type == REG_DWORD) {
|
||||||
TCHAR b[32];
|
TCHAR b[32];
|
||||||
|
|
|
@ -299,8 +299,10 @@ void ShellDirectory::read_directory(int scan_flags)
|
||||||
if (w32fd.dwFileAttributes & FILE_ATTRIBUTE_COMPRESSED)
|
if (w32fd.dwFileAttributes & FILE_ATTRIBUTE_COMPRESSED)
|
||||||
attribs |= SFGAO_COMPRESSED;
|
attribs |= SFGAO_COMPRESSED;
|
||||||
|
|
||||||
if (ext && !_tcsicmp(ext, _T(".lnk")))
|
if (ext && !_tcsicmp(ext, _T(".lnk"))) {
|
||||||
attribs |= SFGAO_LINK;
|
attribs |= SFGAO_LINK;
|
||||||
|
w32fd.dwFileAttributes |= ATTRIBUTE_SYMBOLIC_LINK;
|
||||||
|
}
|
||||||
|
|
||||||
entry->_shell_attribs = attribs;
|
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
|
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->_down = NULL;
|
||||||
entry->_expanded = false;
|
entry->_expanded = false;
|
||||||
entry->_scanned = false;
|
entry->_scanned = false;
|
||||||
|
|
Loading…
Reference in a new issue