Changeset 46


Ignore:
Timestamp:
10/12/2007 9:51:16 AM (7 years ago)
Author:
lowjoel
Message:

-Refactored the File Lock Resolver code a bit
-The Launcher must terminate if the erase-on-restart failed
-Fixed a few stuff in the README

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/EraserDll/FileLockResolver.cpp

    r35 r46  
    2323#include "stdafx.h" 
    2424#include "FileLockResolver.h" 
     25#include "..\Launcher\Launcher.h" 
    2526#include <fstream> 
    2627#include <string> 
     
    124125        || ERROR_SHARING_VIOLATION == dwErrorCode) 
    125126    { 
    126         bool needResolve = true; 
    127         if (TRUE == m_bAskUser ) 
     127        if (TRUE == m_bAskUser) 
    128128        { 
    129              needResolve = (IDYES == AfxGetMainWnd()->MessageBox(CString("The file ") + 
    130                  szFileName + "is locked by another process. Do you want to Erase the file after " + 
    131                  "you restart your computer?", "File Access Denied", MB_YESNO | MB_ICONQUESTION));           
    132         } 
    133  
    134         if (needResolve) 
    135         { 
    136             static PathHelper   path(m_strLockFileList); 
    137             std::ofstream os(m_strLockFileList, std::ios_base::out | std::ios_base::app);        
    138             os << FileData(szFileName, em, passes); 
     129            if (IDYES == AfxGetMainWnd()->MessageBox(CString("The file ") + 
     130                szFileName + "\nis locked by another process. Do you want to Erase the file after " + 
     131                "you restart your computer?", "File Access Denied", MB_YESNO | MB_ICONQUESTION)) 
     132            { 
     133                static PathHelper path(m_strLockFileList); 
     134                std::ofstream os(m_strLockFileList, std::ios_base::out | std::ios_base::app);        
     135                os << FileData(szFileName, em, passes); 
     136            } 
    139137        } 
    140138    } 
     
    175173    CString strPath; 
    176174    PathHelper(strPath, true); 
    177     strPath = CString("\"") + strPath ; 
    178     strPath += LAUNCHER; 
    179     strPath += "\" -rl \""; 
    180     strPath += m_strLockFileList + "\""; 
     175    strPath = CString("\"") + strPath + LAUNCHER + "\" " + szResolveLock; 
     176    strPath += " \"" + m_strLockFileList + "\""; 
    181177 
    182178    extern bool no_registry; 
  • trunk/Launcher/Launcher.cpp

    r37 r46  
    513513                { 
    514514                    AfxMessageBox(ee.what(), MB_ICONERROR); 
     515                    return FALSE; 
    515516                } 
    516517            } 
  • trunk/README.txt

    r3 r46  
    11---------------------------------------------------------------- 
    2 NOTE: This version uses the new installer. You Must remove versions  
    3 5.8 and below by executing a) unwise/unwise32.exe in the eraser directory 
    4 or b) add/remove from the control panel. 
     2NOTE: This version uses a new installer system. You MUST remove 
     3ALL EARLIER VERSIONS before installing this Beta. When installing 
     4an earlier stable build, UNINSTALL the Beta first. 
    55---------------------------------------------------------------- 
    66---------------------------------------------------------------- 
    7 Eraser 5.84 (Aug 8th 2007) 
     7Eraser 5.85 Beta 2 (Oct 12th 2007) 
    88---------------------------------------------------------------- 
    99 
Note: See TracChangeset for help on using the changeset viewer.