Changeset 1739 for trunk/eraser6
- Timestamp:
- 2/3/2010 12:56:25 AM (2 years ago)
- Location:
- trunk/eraser6
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
Eraser.Manager/Task.cs (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/eraser6
- Property svn:mergeinfo changed
/branches/eraser6/6.0 merged: 1737-1738
- Property svn:mergeinfo changed
-
trunk/eraser6/Eraser.Manager/Task.cs
r1698 r1739 455 455 string adsPath = file + ':' + adsName; 456 456 list.Add(adsPath); 457 Util.StreamInfo info = new Util.StreamInfo(adsPath);457 StreamInfo info = new StreamInfo(adsPath); 458 458 totalSize += info.Length; 459 459 } … … 686 686 Regex excludePattern = new Regex(regex, RegexOptions.IgnoreCase); 687 687 foreach (FileInfo file in files) 688 if ((file.Attributes & FileAttributes.ReparsePoint) == 0 && 688 if (file.Exists && 689 (file.Attributes & FileAttributes.ReparsePoint) == 0 && 689 690 excludePattern.Matches(file.FullName).Count == 0) 690 691 { … … 697 698 foreach (FileInfo file in files) 698 699 { 699 if ( (file.Attributes & FileAttributes.ReparsePoint) != 0)700 if (!file.Exists || (file.Attributes & FileAttributes.ReparsePoint) != 0) 700 701 continue; 701 702 … … 800 801 continue; 801 802 802 GetRecyclerFiles(dir, re f result, ref totalSize);803 GetRecyclerFiles(dir, result, ref totalSize); 803 804 } 804 805 } … … 813 814 /// <param name="paths">The list of files to store path information in.</param> 814 815 /// <param name="totalSize">Receives the total size of the files.</param> 815 private void GetRecyclerFiles(DirectoryInfo info, refList<string> paths,816 private void GetRecyclerFiles(DirectoryInfo info, List<string> paths, 816 817 ref long totalSize) 817 818 { 818 819 try 819 820 { 820 foreach (File SystemInfo fsInfo in info.GetFileSystemInfos())821 foreach (FileInfo fileInfo in info.GetFiles()) 821 822 { 822 FileInfo fileInfo = fsInfo as FileInfo; 823 if (fileInfo != null) 824 { 825 totalSize += fileInfo.Length; 826 GetPathADSes(paths, out totalSize, fileInfo.FullName); 827 paths.Add(fileInfo.FullName); 828 } 829 else 830 GetRecyclerFiles((DirectoryInfo)fsInfo, ref paths, ref totalSize); 823 if (!fileInfo.Exists || (fileInfo.Attributes & FileAttributes.ReparsePoint) != 0) 824 continue; 825 826 totalSize += fileInfo.Length; 827 GetPathADSes(paths, out totalSize, fileInfo.FullName); 828 paths.Add(fileInfo.FullName); 831 829 } 830 831 foreach (DirectoryInfo directoryInfo in info.GetDirectories()) 832 if ((directoryInfo.Attributes & FileAttributes.ReparsePoint) == 0) 833 GetRecyclerFiles(directoryInfo, paths, ref totalSize); 832 834 } 833 835 catch (UnauthorizedAccessException e)
Note: See TracChangeset
for help on using the changeset viewer.
