Changeset 893
- Timestamp:
- 4/27/2009 11:47:01 AM (4 years ago)
- File:
-
- 1 edited
-
branches/eraser6/Manager/DirectExecutor.cs (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eraser6/Manager/DirectExecutor.cs
r879 r893 620 620 621 621 //Create the stream 622 using (FileStream stream = new FileStream(currFile, 623 File Mode.CreateNew, FileAccess.Write))622 using (FileStream stream = new FileStream(currFile, FileMode.CreateNew, 623 FileAccess.Write, FileShare.None, 8, FileOptions.WriteThrough)) 624 624 { 625 625 //Set the length of the file to be the amount of free space left … … 824 824 //Create the stream, lengthen the file, then tell the erasure method 825 825 //to erase the tips. 826 using (FileStream stream = streamInfo.Open(FileMode.Open, FileAccess.Write, FileShare.None)) 826 using (FileStream stream = streamInfo.Open(FileMode.Open, FileAccess.Write, 827 FileShare.None, FileOptions.WriteThrough)) 827 828 { 828 829 long fileLength = stream.Length; … … 895 896 using (FileStream strm = new FileStream(Path.Combine( 896 897 info.FullName, GenerateRandomFileName(18)), 897 FileMode.CreateNew, FileAccess.Write)) 898 FileMode.CreateNew, FileAccess.Write, FileShare.None, 8, 899 FileOptions.WriteThrough)) 898 900 { 899 901 //Stretch the file size to use up some of the resident space. … … 1033 1035 { 1034 1036 //Log the error 1037 //TODO: This would leave files after the list unerased. Log this as an error instead 1035 1038 throw new ArgumentException(S._("Compressed, encrypted, or sparse" + 1036 1039 "files cannot be erased with Eraser."));
Note: See TracChangeset
for help on using the changeset viewer.
