files-community / files-community/Files

Bug:When opening the **Recycle Bin** in Files, restoring deleted files results in incorrect file names.

Open
#18,744 1 comment 0 reactions 0 assignees View on GitHub
area - file operations
Dominant language
C#
Stars
45.4k
Forks
2.9k
PR merge metrics
PR metrics pending

Description

### Description

https://github.com/user-attachments/assets/5887b600-1b0f-4d9c-bc83-877a27b7bb89

As shown in the attached video, I created two files on the Desktop: `Text_A.txt` and `Pic.bmp`.

After deleting them:

- If I open the Recycle Bin using **Windows File Explorer** and drag the files back to the Desktop, they are restored with their original file names (`Text_A.txt` and `Pic.bmp`).
- However, if I open the Recycle Bin using **Files** and restore the same files, they are incorrectly restored with names such as `$R174J5H.txt` and `$RF3KD96.bmp` instead of their original names.

### Expected behavior

Files should restore deleted files with their original file names, matching the behavior of Windows File Explorer.

### Actual behavior

The restored files are renamed to their internal Recycle Bin names (for example, `$R174J5H.txt` and `$RF3KD96.bmp`) instead of their original names.

### Steps To Reproduce

1. Create `Text_A.txt` and `Pic.bmp` on the desktop.
2. Delete these two files.
3. Use Files to open the Recycle Bin.
4. Select the two deleted files and drag them back to the desktop.

### Files Version

4.2.0.0

### Windows Version

10.0.26200.8875

### User ID

5be1ab97-a6f8-4ceb-8e51-64d2d86df27a

### Log File

[debug.log](https://github.com/user-attachments/files/30165410/debug.log)

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue using the listed steps with Text_A.txt and Pic.bmp, then trace the Files Recycle Bin restore flow and compare it with Windows File Explorer. Done means restored files retain their original names instead of their internal $R-prefixed names, with the behavior verified for both files.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.