Changeset 895


Ignore:
Timestamp:
4/27/2009 12:49:25 PM (5 years ago)
Author:
lowjoel
Message:

Using FileInfo?.OpenRead? will cause a file to be locked. In our case, the file doesn't need to be locked so open a file handle, allowing other applications to share access. This handles locked files better in tasks.

Location:
branches/eraser6
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eraser6/Eraser/Eraser.csproj

    r794 r895  
    44    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> 
    55    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> 
    6     <ProductVersion>9.0.21022</ProductVersion> 
     6    <ProductVersion>9.0.30729</ProductVersion> 
    77    <SchemaVersion>2.0</SchemaVersion> 
    88    <ProjectGuid>{A9884ABF-46E8-42C1-A30B-9A3DD6C38004}</ProjectGuid> 
  • branches/eraser6/Util/File.cs

    r871 r895  
    4444        { 
    4545            List<string> result = new List<string>(); 
    46             using (FileStream stream = info.OpenRead()) 
     46            using (FileStream stream = new FileStream(info.FullName, FileMode.Open, 
     47                FileAccess.Read, FileShare.ReadWrite)) 
    4748            { 
    4849                SafeFileHandle streamHandle = stream.SafeFileHandle; 
Note: See TracChangeset for help on using the changeset viewer.