From 982ba5e7ea1301b06e89c010d9fe2eb950a9584d Mon Sep 17 00:00:00 2001 From: Martin Fuchs Date: Wed, 18 Feb 2004 19:38:36 +0000 Subject: [PATCH] - eiminated compiler warning - removed NTFS streams support since it never displayed in this version svn path=/branches/lean-explorer/; revision=8247 --- .../subsys/system/explorer/make_explorer.dsp | 6 +- .../system/explorer/shell/shellbrowser.h | 2 +- .../subsys/system/explorer/shell/shellfs.cpp | 3 - .../subsys/system/explorer/shell/winfs.cpp | 93 +------------------ reactos/subsys/system/explorer/shell/winfs.h | 2 - 5 files changed, 5 insertions(+), 101 deletions(-) diff --git a/reactos/subsys/system/explorer/make_explorer.dsp b/reactos/subsys/system/explorer/make_explorer.dsp index 71ef0ca2a38..58f8fe2a8ae 100644 --- a/reactos/subsys/system/explorer/make_explorer.dsp +++ b/reactos/subsys/system/explorer/make_explorer.dsp @@ -4,7 +4,7 @@ # TARGTYPE "Win32 (x86) External Target" 0x0106 -CFG=make_explorer - Win32 bjam +CFG=make_explorer - Win32 Release !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE @@ -13,7 +13,7 @@ CFG=make_explorer - Win32 bjam !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE -!MESSAGE NMAKE /f "make_explorer.mak" CFG="make_explorer - Win32 bjam" +!MESSAGE NMAKE /f "make_explorer.mak" CFG="make_explorer - Win32 Release" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE @@ -106,7 +106,7 @@ CFG=make_explorer - Win32 bjam # PROP Use_Debug_Libraries 0 # PROP Output_Dir "URelease" # PROP Intermediate_Dir "URelease" -# PROP Cmd_Line "msdevfilt -gcc -pipe "perl d:\tools\gSTLFilt.pl" make -f Makefile.MinGW UNICODE=1" +# PROP Cmd_Line "make -f Makefile.MinGW UNICODE=1" # PROP Rebuild_Opt "clean all" # PROP Target_File "explorer.exe" # PROP Bsc_Name "" diff --git a/reactos/subsys/system/explorer/shell/shellbrowser.h b/reactos/subsys/system/explorer/shell/shellbrowser.h index cebd7ce780f..5b4875bdd12 100644 --- a/reactos/subsys/system/explorer/shell/shellbrowser.h +++ b/reactos/subsys/system/explorer/shell/shellbrowser.h @@ -45,7 +45,7 @@ struct ShellPathInfo struct ShellBrowserChild : public IShellBrowserImpl { ShellBrowserChild(HWND hwnd, HWND left_hwnd, WindowHandle& right_hwnd, ShellPathInfo& create_info); - ~ShellBrowserChild(); + virtual ~ShellBrowserChild(); //IOleWindow virtual HRESULT STDMETHODCALLTYPE GetWindow(HWND* lphwnd) diff --git a/reactos/subsys/system/explorer/shell/shellfs.cpp b/reactos/subsys/system/explorer/shell/shellfs.cpp index 7210b846ac2..8e4b7070c19 100644 --- a/reactos/subsys/system/explorer/shell/shellfs.cpp +++ b/reactos/subsys/system/explorer/shell/shellfs.cpp @@ -271,9 +271,6 @@ void ShellDirectory::read_directory(int scan_flags) if (GetFileInformationByHandle(hFile, &entry->_bhfi)) entry->_bhfi_valid = true; - if (ScanNTFSStreams(entry, hFile)) - entry->_scanned = true; // There exist named NTFS sub-streams in this file. - CloseHandle(hFile); } } diff --git a/reactos/subsys/system/explorer/shell/winfs.cpp b/reactos/subsys/system/explorer/shell/winfs.cpp index 7a13156fa64..f555b0becb2 100644 --- a/reactos/subsys/system/explorer/shell/winfs.cpp +++ b/reactos/subsys/system/explorer/shell/winfs.cpp @@ -34,91 +34,6 @@ #include "winfs.h" -int ScanNTFSStreams(Entry* entry, HANDLE hFile) -{ - PVOID ctx = 0; - DWORD read, seek_high; - Entry** pnext = &entry->_down; - int cnt = 0; - - for(;;) { - struct NTFS_StreamHdr : public WIN32_STREAM_ID { - WCHAR name_padding[_MAX_FNAME]; // room for reading stream name - } hdr; - - if (!BackupRead(hFile, (LPBYTE)&hdr, (LPBYTE)&hdr.cStreamName-(LPBYTE)&hdr, &read, FALSE, FALSE, &ctx) || - (long)read!=(LPBYTE)&hdr.cStreamName-(LPBYTE)&hdr) - break; - - if (hdr.dwStreamId == BACKUP_ALTERNATE_DATA) { - if (hdr.dwStreamNameSize && - BackupRead(hFile, (LPBYTE)hdr.cStreamName, hdr.dwStreamNameSize, &read, FALSE, FALSE, &ctx) && - read==hdr.dwStreamNameSize) - { - ++cnt; - - int l = hdr.dwStreamNameSize / sizeof(WCHAR); - LPCWSTR p = hdr.cStreamName; - LPCWSTR e = hdr.cStreamName + l; - - if (l>0 && *p==':') { - ++p, --l; - - e = p; - - while(l>0 && *e!=':') - ++e, --l; - - l = e - p; - } - - Entry* stream_entry = new WinEntry(entry); - - memcpy(&stream_entry->_data, &entry->_data, sizeof(WIN32_FIND_DATA)); - lstrcpy(stream_entry->_data.cFileName, String(p, l)); - - stream_entry->_down = NULL; - stream_entry->_expanded = false; - stream_entry->_scanned = false; - stream_entry->_level = entry->_level + 1; - - *pnext = stream_entry; - pnext = &stream_entry->_next; - } - } - - // jump to the next stream header - if (!BackupSeek(hFile, ~0, ~0, &read, &seek_high, &ctx)) { - DWORD error = GetLastError(); - - if (error != ERROR_SEEK) { - BackupRead(hFile, 0, 0, &read, TRUE, FALSE, &ctx); // terminate BackupRead() loop - THROW_EXCEPTION(error); - //break; - } - - hdr.Size.QuadPart -= read; - hdr.Size.HighPart -= seek_high; - - BYTE buffer[4096]; - - while(hdr.Size.QuadPart > 0) { - if (!BackupRead(hFile, buffer, sizeof(buffer), &read, FALSE, FALSE, &ctx) || read!=sizeof(buffer)) - break; - - hdr.Size.QuadPart -= read; - } - } - } - - if (ctx) - if (!BackupRead(hFile, 0, 0, &read, TRUE, FALSE, &ctx)) // terminate BackupRead() loop - THROW_EXCEPTION(GetLastError()); - - return cnt; -} - - void WinDirectory::read_directory(int scan_flags) { CONTEXT("WinDirectory::read_directory()"); @@ -168,9 +83,6 @@ void WinDirectory::read_directory(int scan_flags) if (GetFileInformationByHandle(hFile, &entry->_bhfi)) entry->_bhfi_valid = true; - if (ScanNTFSStreams(entry, hFile)) - entry->_scanned = true; // There exist named NTFS sub-streams in this file. - CloseHandle(hFile); } } @@ -258,10 +170,7 @@ bool WinEntry::get_path(PTSTR path) const memcpy(path+1, name, l*sizeof(TCHAR)); len += l+1; - if (entry->_up && !(entry->_up->_data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) // a NTFS stream? - path[0] = TEXT(':'); - else - path[0] = TEXT('\\'); + path[0] = TEXT('\\'); } entry = entry->_up; diff --git a/reactos/subsys/system/explorer/shell/winfs.h b/reactos/subsys/system/explorer/shell/winfs.h index 8e371e8acf0..529be7f86d1 100644 --- a/reactos/subsys/system/explorer/shell/winfs.h +++ b/reactos/subsys/system/explorer/shell/winfs.h @@ -62,5 +62,3 @@ struct WinDirectory : public WinEntry, public Directory virtual void read_directory(int scan_flags=SCAN_ALL); virtual Entry* find_entry(const void*); }; - -extern int ScanNTFSStreams(Entry* entry, HANDLE hFile);