Changeset 2529
- Timestamp:
- 03/15/12 01:29:57 (14 months ago)
- Location:
- branches/eraser6/6.0
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
Eraser.Manager/Task.cs (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eraser6/6.0
- Property svn:mergeinfo changed
/trunk/eraser merged: 2522,2527
- Property svn:mergeinfo changed
-
branches/eraser6/6.0/Eraser.Manager/Task.cs
r2264 r2529 735 735 string[] rootDirectory = new string[] { 736 736 "$RECYCLE.BIN", 737 "RECYCLER" 737 "RECYCLER", 738 "RECYCLED" 738 739 }; 740 string userSid = System.Security.Principal.WindowsIdentity.GetCurrent(). 741 User.ToString(); 739 742 740 743 foreach (DriveInfo drive in DriveInfo.GetDrives()) … … 742 745 foreach (string rootDir in rootDirectory) 743 746 { 744 DirectoryInfo dir = new DirectoryInfo( 745 System.IO.Path.Combine( 746 System.IO.Path.Combine(drive.Name, rootDir), 747 System.Security.Principal.WindowsIdentity.GetCurrent(). 748 User.ToString())); 749 if (!dir.Exists) 747 //First get the global recycle bin for the current drive 748 string recycleBinPath = System.IO.Path.Combine( 749 drive.Name, rootDir); 750 if (!Directory.Exists(recycleBinPath)) 750 751 continue; 751 752 752 GetRecyclerFiles(dir, result, ref totalSize); 753 //Try to see if we can get the user's own recycle bin 754 if (Directory.Exists(System.IO.Path.Combine(recycleBinPath, userSid))) 755 recycleBinPath = System.IO.Path.Combine(recycleBinPath, userSid); 756 GetRecyclerFiles(new DirectoryInfo(recycleBinPath), result, ref totalSize); 753 757 } 754 758 }
Note: See TracChangeset
for help on using the changeset viewer.
