Changeset 32


Ignore:
Timestamp:
10/10/2007 10:58:03 AM (7 years ago)
Author:
lowjoel
Message:

-Commit my fix for files which have filenames which are too long for the standard Windows filename handling to work
-Commit my fix to ignore files which are actually junctions or symbolic links
-UNC files are now ignored during free space wipes
-Silenced a few unused formal parameter warnings

Location:
trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/Eraser.cpp

    r23 r32  
    11// Eraser.cpp 
     2// $Id$ 
    23// 
    34// Eraser. Secure data removal. For Windows. 
    45// Copyright © 1997-2001  Sami Tolvanen (sami@tolvanen.com). 
    5 // Copyright © 2002 Garrett Trant (support@heidi.ie). 
     6// Copyright © 2001-2006  Garrett Trant (support@heidi.ie). 
     7// Copyright © 2007 The Eraser Project 
    68// 
    79// This program is free software; you can redistribute it and/or 
  • trunk/EraserDll/Eraser.cpp

    r20 r32  
    1 using namespace System::Runtime::Serialization; 
    21// Eraser.cpp 
    32// 
    43// Eraser. Secure data removal. For Windows. 
    54// Copyright © 1997-2001  Sami Tolvanen (sami@tolvanen.com). 
     5// Copyright © 2007 The Eraser Project 
    66// 
    77// This program is free software; you can redistribute it and/or 
     
    4848#endif 
    4949 
     50#undef MAX_PATH 
     51#define MAX_PATH 2048 //HACK: Some filenames under Vista can exceed the 260 
     52                      //char limit. This will have to do for now. 
    5053 
    5154///////////////////////////////////////////////////////////////////////////// 
     
    722725            // drive must be given as "X:\\" 
    723726 
    724             // In thi needed for UNC files? 
    725             //if (!isalpha(szItem[0]) || szItem[1] != ':' || szItem[2] != '\\') { 
    726             //    return ERASER_ERROR_PARAM2; 
    727             //} 
     727            if (!isalpha(szItem[0]) || szItem[1] != ':' || szItem[2] != '\\') { 
     728                return ERASER_ERROR_PARAM2; 
     729            } 
    728730 
    729731            eraserContextAccess(context); 
     
    24642466            return; 
    24652467 
    2466         srand(time(NULL)); 
     2468        srand((unsigned int)time(NULL)); 
    24672469        for (int retries = 10; retries > 0; retries--) { 
    24682470            CFile file; 
  • trunk/EraserDll/FileLockResolver.cpp

    r4 r32  
    155155     
    156156} 
    157 void  
    158 CFileLockResolver::Resolve(LPCTSTR szFileName) 
     157 
     158void  
     159CFileLockResolver::Resolve(LPCTSTR /*szFileName*/) 
    159160{ 
    160161     
  • trunk/EraserDll/FreeSpace.cpp

    r4 r32  
    33// Eraser. Secure data removal. For Windows. 
    44// Copyright © 1997-2001  Sami Tolvanen (sami@tolvanen.com). 
     5// Copyright © 2007 The Eraser Project 
    56// 
    67// This program is free software; you can redistribute it and/or 
     
    3738    = "DisableLowDiskSpaceBroadcast"; 
    3839 
     40#undef MAX_PATH 
     41#define MAX_PATH 2048 //HACK: Some filenames under Vista can exceed the 260 
     42                      //char limit. This will have to do for now. 
     43 
    3944static inline E_UINT32 
    4045disableLowDiskSpaceNotification(TCHAR szDrive) 
     
    232237                } 
    233238 
     239                // skip volume mount point 
     240                if (bitSet(wfdData.dwFileAttributes, FILE_ATTRIBUTE_REPARSE_POINT)) { 
     241                    continue; 
     242                } 
    234243                if (bitSet(wfdData.dwFileAttributes, FILE_ATTRIBUTE_DIRECTORY)) { 
    235244                    // skip "." and ".." 
     
    292301 
    293302            if (bitSet(wfdData.dwFileAttributes, FILE_ATTRIBUTE_DIRECTORY)) { 
     303                // skip volume mount point 
     304                if (bitSet(wfdData.dwFileAttributes, FILE_ATTRIBUTE_REPARSE_POINT)) { 
     305                    strFile = strDirectory + wfdData.cFileName; 
     306                    context->m_saFailed.Add(strFile + " (Reparse point)"); 
     307                    continue; 
     308                } 
    294309                // skip "." and ".." 
    295310                if (ISNT_SUBFOLDER(wfdData.cFileName)) { 
  • trunk/EraserDoc.cpp

    r31 r32  
    2828#include "shared\utils.h" 
    2929#include "PreferencesSheet.h" 
    30 #include "EraserUI\FileDialogEx.h" 
    3130#include "EraserUI\TimeOutMessageBox.h" 
    3231#include "EraserDoc.h" 
  • trunk/EraserUI/NewDialog.cpp

    r27 r32  
    101101} 
    102102 
    103 void CNewDialog::OnTvnSelchangedTree1(NMHDR *pNMHDR, LRESULT *pResult) 
     103void CNewDialog::OnTvnSelchangedTree1(NMHDR * /*pNMHDR*/, LRESULT *pResult) 
    104104{ 
    105105    //LPNMTREEVIEW pNMTreeView = reinterpret_cast<LPNMTREEVIEW>(pNMHDR); 
  • trunk/Erasext/ErasextMenu.cpp

    r26 r32  
    529529 
    530530void  
    531 CErasextMenu::getstr_handle_erase(UINT nType, CString& cmdstr) 
     531CErasextMenu::getstr_handle_erase(UINT /*nType*/, CString& cmdstr) 
    532532{ 
    533533    if (m_bUseFiles) 
     
    544544 
    545545} 
     546 
    546547void  
    547 CErasextMenu::getstr_handle_move(UINT nType, CString& cmdstr) 
     548CErasextMenu::getstr_handle_move(UINT /*nType*/, CString& cmdstr) 
    548549{ 
    549550     
  • trunk/HotKeyDlg.cpp

    r29 r32  
    149149                DWORD count = 0; 
    150150                kReg.GetValue(count, "__count", 0); 
    151                 for (int i = 0; i < count; i++) { 
     151                for (DWORD i = 0; i < count; i++) { 
    152152                    CString temp, key, value; 
    153153                    temp.Format("__key_%ld", i); 
     
    242242 
    243243IMPLEMENT_DYNAMIC(CHotKeyDlg, CDialog) 
    244 CHotKeyDlg::CHotKeyDlg(CWnd* pParent /*=NULL*/, int iValCnt) 
     244CHotKeyDlg::CHotKeyDlg(CWnd* pParent /*=NULL*/) 
    245245: CDialog(CHotKeyDlg::IDD, pParent),m_arKeyValues(),m_lcHotKeys() 
    246246{    
     
    313313 
    314314 
    315 void CHotKeyDlg::OnNMClickListHotkeys(NMHDR *pNMHDR, LRESULT *pResult) 
     315void CHotKeyDlg::OnNMClickListHotkeys(NMHDR * /*pNMHDR*/, LRESULT *pResult) 
    316316{ 
    317317    // TODO: Add your control notification handler code here 
  • trunk/HotKeyDlg.h

    r29 r32  
    3434 
    3535public: 
    36     CHotKeyDlg(CWnd* pParent = NULL, int iValCnt = iCommandCount);   // standard constructor 
     36    CHotKeyDlg(CWnd* pParent = NULL);   // standard constructor 
    3737    virtual ~CHotKeyDlg(); 
    3838 
  • trunk/TaskPropertySheet.cpp

    r3 r32  
    8585    //}}AFX_MSG_MAP 
    8686END_MESSAGE_MAP() 
    87 LRESULT CTaskPropertySheet::OnKickIdle(WPARAM wp, LPARAM lp) 
     87LRESULT CTaskPropertySheet::OnKickIdle(WPARAM /*wp*/, LPARAM /*lp*/) 
    8888{ 
    8989    ASSERT_VALID(this); 
  • trunk/shared/key.cpp

    r27 r32  
    369369} 
    370370 
    371 BOOL CIniKey::Open(HKEY hKey, LPCTSTR lpszKeyName, BOOL bCreate) { 
     371BOOL CIniKey::Open(HKEY /*hKey*/, LPCTSTR lpszKeyName, BOOL /*bCreate*/) { 
    372372    section = lpszKeyName; 
    373373    section.Replace('/', '\\'); 
     
    449449} 
    450450 
    451 BOOL CIniKey::DeleteValue(LPCTSTR lpszValueName) { 
     451BOOL CIniKey::DeleteValue(LPCTSTR /*lpszValueName*/) { 
    452452    return false; 
    453453} 
     
    469469} 
    470470 
    471 BOOL CIniKey::GetNextValueName(CString& strValName, DWORD index, LPDWORD valType) { 
     471BOOL CIniKey::GetNextValueName(CString& strValName, DWORD /*index*/, LPDWORD /*valType*/) { 
    472472    assert(("CIniKey::GetNextValueName() not implemented!", false)); 
    473473    strValName = ""; 
Note: See TracChangeset for help on using the changeset viewer.