- eiminated compiler warning
authorMartin Fuchs <fuchs.martin@gmail.com>
Wed, 18 Feb 2004 19:38:36 +0000 (19:38 +0000)
committerMartin Fuchs <fuchs.martin@gmail.com>
Wed, 18 Feb 2004 19:38:36 +0000 (19:38 +0000)
- removed NTFS streams support since it never displayed in this version

svn path=/branches/lean-explorer/; revision=8247

reactos/subsys/system/explorer/make_explorer.dsp
reactos/subsys/system/explorer/shell/shellbrowser.h
reactos/subsys/system/explorer/shell/shellfs.cpp
reactos/subsys/system/explorer/shell/winfs.cpp
reactos/subsys/system/explorer/shell/winfs.h

index 71ef0ca..58f8fe2 100644 (file)
@@ -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 ""
index cebd7ce..5b4875b 100644 (file)
@@ -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)
index 7210b84..8e4b707 100644 (file)
@@ -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);
                                        }
                                }
index 7a13156..f555b0b 100644 (file)
 #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;
index 8e371e8..529be7f 100644 (file)
@@ -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);