Skip to content

[ImageResizer] Original image backup permanently deleted on a drive which lacks a Recycle Bin #42193

@daverayment

Description

@daverayment

Microsoft PowerToys version

0.94.2

Installation method

Dev build in Visual Studio

Area(s) with issue?

Image Resizer

Steps to reproduce

Background

Image Resizer includes an option to replace the original file with the resized result. As a safety measure, the original file is renamed to [filename].bak.[extension] and sent to the Recycle Bin. If the user changes their mind about the resize, they can quickly restore the original file from the Recycle Bin.

Image Resizer does not detect the presence of a Recycle Bin before attempting to move the backup file, resulting in a permanent deletion of the file on any drive which lacks that capability, removing the ability for the user to restore the original file.

Steps

  1. Select one or more files on a drive which lacks a Recycle Bin, e.g. a USB flash drive formatted as FAT.

  2. Select Overwrite files in the Image Resizer dialog:Image

  3. Click Resize and wait for the operation to complete.

✔️ Expected Behavior

One of the following:

  1. The operation is cancelled with an error/warning dialog, clearly describing the lack of the Recycle Bin on the drive; or
  2. The user is shown a confirmation dialog asking to confirm a permanent deletion of the original; or
  3. The resize operation completes, but the backup of the original is not moved to the Recycle Bin; instead, it is kept in the same folder as the resized image.

(My preference would be 3, as it requires no user interaction and removes the ability for the user to accidentally delete their original files should they choose the wrong option in a dialog. It is also the simplest option for cases where the user has chosen multiple files from different drives, some with Recycle Bins and others without.)

❌ Actual Behavior

The resize operation completes, the original file is replaced by the resized image, and the backup of the original file is permanently deleted instead of being sent to the Recycle Bin.

Additional Information

No response

Other Software

No response

Metadata

Metadata

Assignees

Labels

Issue-BugSomething isn't workingNeeds-TriageFor issues raised to be triaged and prioritized by internal Microsoft teamsProduct-Image ResizerThings regarding image resizing module

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions