[DATA LOSS] Deleting junctions resulted in deletion of junction target contents

Things you’d like to miss in the future...
arrow
Posts: 12
Joined: 19 Feb 2022 00:45

[DATA LOSS] Deleting junctions resulted in deletion of junction target contents

Post by arrow »

What happened:
I deleted a junction that pointed to another directory on a separate drive and it resulted in recursive deletion of all contents within that junction target. This resulted in detrimental data loss. The files were permanently deleted without being sent to the Recycle Bin.

When I first deleted the junction and pressed "OK" to send to the Recylce Bin, XYplorer UI would grey-out as if being unresponsive (perhaps because it was trying to delete many terabytes of data). In this instance I closed XYplorer, although I was unaware that this essentially cancelled the deletion process and salvaged some data.

I'm unsure of how this is even possible as I've deleted junctions before with no issue, and I'm unable to reproduce the event on deleting different junctions that I've created. However, I am 100% certain that this event of data loss was the result of deleting a junction within XYplorer as I had tried to delete the same junction twice (being unaware that this was the cause), and I experienced the same events of unresponsiveness of the program, forced closure of the program, and then I noticed further data loss after checking the junction target path again.

The only safe way to delete the junction was through Windows Explorer.

The following is similar to the file structure I had:

Code: Select all

Junction path: "D:\#dirname1\Junction to #dirname2"
Junction target: "F:\#dirname2\"
I recently upgraded to v24.70.0000 from v23.90.0400, so I'm wondering if there was a modification to how deleting or junctions worked in XYplorer since then.

admin
Site Admin
Posts: 60635
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: [DATA LOSS] Deleting junctions resulted in deletion of junction target contents

Post by admin »

Too bad. :(

But I cannot reproduce it, and nothing has changed about it for a long time. And the deletion is done by the shell anyway, XYplorer just passes it on to Windows.

1) Created a junction to a folder on another drive (USB drive). Deleted the junction to the recycle bin: The target folder on the USB drive was not touched. And the junction could be restored from the recycle bin.

2) Created a junction to a folder on another drive (USB drive). Deleted the junction permanently: The target folder on the USB drive was not touched.

I vaguely remember that in a previous Windows version (XP?) the behavior was different. I myself lost data that way.

Which Windows version are you using?


arrow
Posts: 12
Joined: 19 Feb 2022 00:45

Re: [DATA LOSS] Deleting junctions resulted in deletion of junction target contents

Post by arrow »

I'm using Win10 1909, so it is a little dated, but not so dated that I believe it was due to this.

The only thing that I did differently during this whole ordeal that I could think of (apart from updating XYplorer) was that I at one point accessed this drive through a virtual machine instance that was running the current Win10 22H2 version (the VM was not running at the time of deletion). Unless this could have also modified how the junction worked, I'm flabbergasted as to how this could have happened.

I should also note that upon moving aforementioned junction into the Recylce Bin with Windows Explorer, I then tried to empty the Recycle Bin in XYplorer (at a later time), which resulted in further data loss. I was, however, able to empty the Recycle Bin in Windows Explorer.

I was prompted to update XYplorer to the latest version was due to the fact that thumbnail previews of symbolic links of items would not display which was apparently a bug in the older version, and was fixed earlier this year according to the forums. Since symbolic links/junctions are somewhat related, I thought perhaps there was a particular change in XYplorer that lead to this event.

admin
Site Admin
Posts: 60635
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: [DATA LOSS] Deleting junctions resulted in deletion of junction target contents

Post by admin »

There cannot be any relation to the thumbnail previews fix. As I said, unless you use the Wipe function in XYplorer, the deletions are handled by the Windows shell.

Hard to explain what happened. How exactly did you trigger the deletion?

arrow
Posts: 12
Joined: 19 Feb 2022 00:45

Re: [DATA LOSS] Deleting junctions resulted in deletion of junction target contents

Post by arrow »

Selected the junction with mouse, then pressed "Delete" > "Enter" on keyboard.

admin
Site Admin
Posts: 60635
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: [DATA LOSS] Deleting junctions resulted in deletion of junction target contents

Post by admin »

1) In the list or in the tree?

2) What dialog did you see when you pressed ENTER?

arrow
Posts: 12
Joined: 19 Feb 2022 00:45

Re: [DATA LOSS] Deleting junctions resulted in deletion of junction target contents

Post by arrow »

1) The view mode was likely 'List', but could have been 'Details'. 'Branch View' was not enabled.

2) I did not notice anything different when deleting the junction. Dialogue was likely "Are you sure you want to move this folder to the Recycle Bin?"
Last edited by arrow on 15 Aug 2023 17:02, edited 1 time in total.

admin
Site Admin
Posts: 60635
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: [DATA LOSS] Deleting junctions resulted in deletion of junction target contents

Post by admin »

I meant: did you select the junction in the folder tree or in the file list?

arrow
Posts: 12
Joined: 19 Feb 2022 00:45

Re: [DATA LOSS] Deleting junctions resulted in deletion of junction target contents

Post by arrow »

I selected the junction in the list.

Going back to your second question. When I pressed 'ENTER' to confirm the deletion, XYplorer would grey-out as if unresponsive (I was unaware at the time that it was deleting many terabytes of data), which I responded with forced closure after waiting a bit.
Last edited by arrow on 15 Aug 2023 17:09, edited 2 times in total.

admin
Site Admin
Posts: 60635
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: [DATA LOSS] Deleting junctions resulted in deletion of junction target contents

Post by admin »

Can you create a test folder on that other drive, create a junction to it, and delete that junction the same way you did before? In other words, can you recreate the events with some test files to see if the disaster (but this time only with test files) happens again?

arrow
Posts: 12
Joined: 19 Feb 2022 00:45

Re: [DATA LOSS] Deleting junctions resulted in deletion of junction target contents

Post by arrow »

I cannot reproduce this event either.
- I was able to delete other junctions I had created in that same directory with no issue (different junction targets as the disaster event but located on the same drive).
- I tried creating a symbolic link, in the off-chance that I created that instead of a junction, with no results.
- The original junction target path has many terabytes of data with thousands of sub-directories, so perhaps that could be a key attribute of this event, but I'm too afraid to try this on the original junction target again. I tried this on a 750gb and a 250gb directory with no results either, though both of these directories' file structures are not nearly as lengthy, and they are also located on a different drive.

Hard Drive failure was actually my first thought as the possible cause however all my SMART readings are fine, this is only a 2 year old drive, and there is that fact that I was able to replicate data loss (unintentionally) while attempting to delete the junction the second time in XYplorer.

admin
Site Admin
Posts: 60635
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: [DATA LOSS] Deleting junctions resulted in deletion of junction target contents

Post by admin »

If size really matters here, then you may have discovered a serious Windows bug. But I don't really see why size would matter here. :?

arrow
Posts: 12
Joined: 19 Feb 2022 00:45

Re: [DATA LOSS] Deleting junctions resulted in deletion of junction target contents

Post by arrow »

I've been trying to recreate this event lately, and recently was able to create a symlink that pops up a special deletion prompt when trying to delete via pressing the "DEL" button on the keyboard:
Invalid Filenames
The selection contains items with invalid names.

The Windows Shell cannot handle these items, and there is no way to delete them to Recycle Bin. XYplorer, however, can at least delete the items permanently.

Click OK to delete the items permanently (no Recycle Bin) with all their contents now.
I think perhaps when I was going though the habitual motions of deleting files and folders confidently (just pressing 'DEL' > 'ENTER' in a speedy fashion), and certainly not expecting such a prompt when deleting symlinks/junctions, I likely received this exact prompt a few months ago and proceeded with permanent deletion.

I guess the bug here is that such a prompt should never pop up for symlinks and junctions in the first place. I am able to delete this symlink (send to recycle bin) normally outside of XYplorer, so I'm assuming that XYplorer's deletion function is unnecessarily digging into the symlinks/junctions somehow.

Additional info that may be important:
  • I had previously created the symlink and deleted it immediately with no issues a couple days ago (via the normal "Send to Recycle bin" prompt). Allowing this symlink sit for a couple days, it now gives me this new prompt.
  • My other symlinks/junctions that target to basic file structures do not give this special prompt (the file structure of the directory that this problematic symlink points to is quite convoluted and on par with "C:\Windows")

admin
Site Admin
Posts: 60635
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: [DATA LOSS] Deleting junctions resulted in deletion of junction target contents

Post by admin »

Bingo, you got it! :tup: Will be fixed in the next beta.

"Allowing this symlink sit for a couple days..." ... I'm not sure about that. I assume it is also fixed now.
arrow wrote: 28 Oct 2023 00:00 Additional info that may be important:
  • I had previously created the symlink and deleted it immediately with no issues a couple days ago (via the normal "Send to Recycle bin" prompt). Allowing this symlink sit for a couple days, it now gives me this new prompt.

Post Reply