Skip to content

Commit

Permalink
Added feedback after confirming empty command before deletion begins
Browse files Browse the repository at this point in the history
  • Loading branch information
jorystewart committed Aug 10, 2024
1 parent 0b72e1c commit 2312950
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions Trashman/src/RecycleBin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ public static void EmptyRecycleBinContents()
ConsoleKeyInfo confirmKey = Console.ReadKey(true);
if (confirmKey.Key == ConsoleKey.Y)
{
Console.WriteLine("Deleting...");
int hResult = SHEmptyRecycleBinW(IntPtr.Zero, String.Empty, flags);
if (hResult == 0)
{
Expand Down
1 change: 1 addition & 0 deletions Trashman/src/Trash.cs
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,7 @@ public static void EmptyTrashContents()
ConsoleKeyInfo confirmKey = Console.ReadKey(true);
if (confirmKey.Key == ConsoleKey.Y)
{
Console.WriteLine("Deleting...")
foreach (FileSystemInfo item in trashFilesDir.EnumerateFileSystemInfos())
{
switch (item)
Expand Down

0 comments on commit 2312950

Please sign in to comment.