Changeset 1015


Ignore:
Timestamp:
5/7/2009 2:45:20 PM (5 years ago)
Author:
lowjoel
Message:

-Reset a file's read-only flag only after an erase failed
-NTFS' minimum date is 1601 January 1 UTC. Make sure that it is UTC when converting dates (the earlier bug wasn't fixed.)

Location:
branches/eraser6/Manager
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eraser6/Manager/DirectExecutor.cs

    r1011 r1015  
    827827                finally 
    828828                { 
    829                     //Re-set the read-only flag 
    830                     info.IsReadOnly = isReadOnly; 
     829                    //Re-set the read-only flag if the file exists (i.e. there was an error) 
     830                    if (info.Exists) 
     831                        info.IsReadOnly = isReadOnly; 
    831832                } 
    832833            } 
  • branches/eraser6/Manager/FileSystem.cs

    • Property svn:eol-style set to native
    • Property svn:keywords set to Id
    r1014 r1015  
    11/*  
    2  * $Id: DirectExecutor.cs 894 2009-04-27 11:46:42Z lowjoel $ 
     2 * $Id$ 
    33 * Copyright 2008 The Eraser Project 
    44 * Original Author: Joel Low <lowjoel@users.sourceforge.net> 
     
    447447            get 
    448448            { 
    449                 return new DateTime(1601, 1, 1, 0, 0, 0); 
     449                return new DateTime(1601, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc); 
    450450            } 
    451451        } 
     
    457457    public class FatFileSystem : WindowsFileSystem 
    458458    { 
    459         public override void EraseOldFileSystemResidentFiles(VolumeInfo info, ErasureMethod method, FileSystemEntriesEraseProgress callback) 
    460         { 
    461             throw new NotImplementedException(); 
    462         } 
    463  
    464         public override void EraseDirectoryStructures(VolumeInfo info, FileSystemEntriesEraseProgress callback) 
     459        public override void EraseOldFileSystemResidentFiles(VolumeInfo info, 
     460            ErasureMethod method, FileSystemEntriesEraseProgress callback) 
     461        { 
     462            //Nothing to be done here. FAT doesn't store files in its FAT. 
     463        } 
     464 
     465        public override void EraseDirectoryStructures(VolumeInfo info, 
     466            FileSystemEntriesEraseProgress callback) 
    465467        { 
    466468            throw new NotImplementedException(); 
Note: See TracChangeset for help on using the changeset viewer.