Changeset 2522
- Timestamp:
- 3/14/2012 8:35:27 AM (14 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/eraser/Eraser.DefaultPlugins/ErasureTargets/RecycleBinErasureTarget.cs
r2516 r2522 78 78 string[] rootDirectory = new string[] { 79 79 "$RECYCLE.BIN", 80 "RECYCLER" 80 "RECYCLER", 81 "RECYCLED" 81 82 }; 82 83 string userSid = System.Security.Principal.WindowsIdentity.GetCurrent(). … … 87 88 foreach (string rootDir in rootDirectory) 88 89 { 89 DirectoryInfo dir = new DirectoryInfo( 90 System.IO.Path.Combine( 91 System.IO.Path.Combine(drive.Name, rootDir), 92 userSid)); 93 if (!dir.Exists) 90 //First get the global recycle bin for the current drive 91 string recycleBinPath = System.IO.Path.Combine(drive.Name, rootDir); 92 if (!Directory.Exists(recycleBinPath)) 94 93 continue; 95 94 96 foreach (FileInfo file in GetFiles(dir)) 95 //Try to see if we can get the user's own recycle bin 96 if (Directory.Exists(System.IO.Path.Combine(recycleBinPath, userSid))) 97 recycleBinPath = System.IO.Path.Combine(recycleBinPath, userSid); 98 99 foreach (FileInfo file in GetFiles(new DirectoryInfo(recycleBinPath))) 97 100 { 98 101 //Add the ADSes
Note: See TracChangeset
for help on using the changeset viewer.
