Changeset 1745 for branches/eraser6/CodeReview/Eraser.Manager/Task.cs
- Timestamp:
- 2/3/2010 3:37:13 AM (2 years ago)
- Location:
- branches/eraser6/CodeReview
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
Eraser.Manager/Task.cs (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eraser6/CodeReview
- Property svn:mergeinfo changed
/branches/eraser6/6.0 merged: 1721,1723,1730,1732,1734-1735,1737-1738,1740,1742 /trunk/eraser6 merged: 1706-1743
- Property svn:mergeinfo changed
-
branches/eraser6/CodeReview/Eraser.Manager/Task.cs
r1709 r1745 456 456 string adsPath = file + ':' + adsName; 457 457 list.Add(adsPath); 458 Util.StreamInfo info = new Util.StreamInfo(adsPath);458 StreamInfo info = new StreamInfo(adsPath); 459 459 totalSize += info.Length; 460 460 } … … 693 693 Regex excludePattern = new Regex(regex, RegexOptions.IgnoreCase); 694 694 foreach (FileInfo file in files) 695 if ((file.Attributes & FileAttributes.ReparsePoint) == 0 && 695 if (file.Exists && 696 (file.Attributes & FileAttributes.ReparsePoint) == 0 && 696 697 excludePattern.Matches(file.FullName).Count == 0) 697 698 { … … 704 705 foreach (FileInfo file in files) 705 706 { 706 if ( (file.Attributes & FileAttributes.ReparsePoint) != 0)707 if (!file.Exists || (file.Attributes & FileAttributes.ReparsePoint) != 0) 707 708 continue; 708 709 … … 807 808 continue; 808 809 809 GetRecyclerFiles(dir, re f result, ref totalSize);810 GetRecyclerFiles(dir, result, ref totalSize); 810 811 } 811 812 } … … 820 821 /// <param name="paths">The list of files to store path information in.</param> 821 822 /// <param name="totalSize">Receives the total size of the files.</param> 822 private void GetRecyclerFiles(DirectoryInfo info, refList<string> paths,823 private void GetRecyclerFiles(DirectoryInfo info, List<string> paths, 823 824 ref long totalSize) 824 825 { 825 826 try 826 827 { 827 foreach (File SystemInfo fsInfo in info.GetFileSystemInfos())828 foreach (FileInfo fileInfo in info.GetFiles()) 828 829 { 829 FileInfo fileInfo = fsInfo as FileInfo; 830 if (fileInfo != null) 831 { 832 totalSize += fileInfo.Length; 833 GetPathADSes(paths, out totalSize, fileInfo.FullName); 834 paths.Add(fileInfo.FullName); 835 } 836 else 837 GetRecyclerFiles((DirectoryInfo)fsInfo, ref paths, ref totalSize); 830 if (!fileInfo.Exists || (fileInfo.Attributes & FileAttributes.ReparsePoint) != 0) 831 continue; 832 833 totalSize += fileInfo.Length; 834 GetPathADSes(paths, out totalSize, fileInfo.FullName); 835 paths.Add(fileInfo.FullName); 838 836 } 837 838 foreach (DirectoryInfo directoryInfo in info.GetDirectories()) 839 if ((directoryInfo.Attributes & FileAttributes.ReparsePoint) == 0) 840 GetRecyclerFiles(directoryInfo, paths, ref totalSize); 839 841 } 840 842 catch (UnauthorizedAccessException e)
Note: See TracChangeset
for help on using the changeset viewer.
