Page 1 of 2

Delete Junction confusion

Posted: 15 Aug 2022 10:03
by Evolve
Configuration | General | Safety Belts, Network | Safety Belts | [x] Confirm delete operations

If you try to delete a junction with the regular delete (2) or the keyboard Del button, the confirmation dialog says that you're about to delete all the files inside the target folder which is incorrect. The only thing that gets deleted is the junction itself.
RegularDelete.png
Also "Delete Junction..." (1) misleads to the same conclusion that the regular "Delete" (2) is somehow different and therefore must delete the target folder.
JunctionMenu.png
Fixing the first part is obvious: replace the confirmation dialog for junctions with "Delete Junction?..." one.
I see two possible improvements of the second part:
- Just remove "Delete Junction...", it is redundant and confusing.
- Keep it but add its counter i.e "Delete Junction and Target" and/or (if possible) even more useful "Delete Target with all Junctions" (and warn of what they do in the popups as well).

Re: Delete Junction confusion

Posted: 15 Aug 2022 11:56
by PeterH
Remember this was as old Windows, at least Win XP, worked.
My wish at that time was that XY just delete the junction and leave the rest as is, but Don said users might be "irritated" by that.

As XY notifies users on delete of a junction, it could be able to delete it save, i.e. without deleting it's contained objects - as current windows does. (As XY does now for Junction/Delete Junction. Then this command wouldn't be neccessary any more.)

Re: Delete Junction confusion

Posted: 17 Aug 2022 19:40
by admin
Tricky. In Win XP the shell delete killed everything, the junction and its target. I was bitten hard by this once and I guess that shock brought me to pop those warnings. You never know what the next Windows version will do.

Re: Delete Junction confusion

Posted: 18 Aug 2022 09:13
by admin
Evolve wrote: 15 Aug 2022 10:03 Fixing the first part is obvious: replace the confirmation dialog for junctions with "Delete Junction?..." one.
I did this now if it is Win8 or later. I'm not sure about Win7 and I'm sure WinXP would just destroy everything.

I will keep the "Delete Junction..." commands. It looks like they do the same thing as the plain Delete command in modern Windows, but under the hood they use a different method, and this difference might become handy when the next Windows changes the rules again.

Re: Delete Junction confusion

Posted: 18 Aug 2022 09:46
by LittleBiG
admin wrote: 18 Aug 2022 09:13 I did this now if it is Win8 or later. I'm not sure about Win7 and I'm sure WinXP would just destroy everything.

I will keep the "Delete Junction..." commands. It looks like they do the same thing as the plain Delete command in modern Windows, but under the hood they use a different method, and this difference might become handy when the next Windows changes the rules again.
Actually from user perspective, I would expect two commands. The first deletes the junction, the second deletes everything. I would expect clear disctinction between them. I think XY should handle this somehow no matter what Windows version I have.

Re: Delete Junction confusion

Posted: 18 Aug 2022 10:04
by Horst
LittleBiG wrote: 18 Aug 2022 09:46
admin wrote: 18 Aug 2022 09:13 I did this now if it is Win8 or later. I'm not sure about Win7 and I'm sure WinXP would just destroy everything.

I will keep the "Delete Junction..." commands. It looks like they do the same thing as the plain Delete command in modern Windows, but under the hood they use a different method, and this difference might become handy when the next Windows changes the rules again.
Actually from user perspective, I would expect two commands. The first deletes the junction, the second deletes everything. I would expect clear disctinction between them. I think XY should handle this somehow no matter what Windows version I have.
There should never ever be a command in XY which deletes the target files of a junction.
Its dangerous and there is no real need for it.
A user can always delete the target files with normal ways.
For me the need for deleting a junction and the target files is almost zero.
This is the experience from working many years in outsourcing of server management.

Re: Delete Junction confusion

Posted: 18 Aug 2022 10:10
by highend
Yeah, I'm in the same boat. Please delete the junction, not its referenced content. Give a warning to XP users that it will delete everything but any OS above that: Only delete the junction

Re: Delete Junction confusion

Posted: 18 Aug 2022 11:02
by LittleBiG
Interesting. If I paste a folder as junction, it won't have the Junction section in the context menu. OneDrive doesn't have either. Other system junctions are ok. Do you have any idea why this could happen?

Re: Delete Junction confusion

Posted: 18 Aug 2022 11:15
by admin
Cannot confirm. :?

Re: Delete Junction confusion

Posted: 18 Aug 2022 11:23
by LittleBiG
Unfortunately it does happen. And I can tell you that it appears only if the system attribute is set as well. (but if I add the system attrib later to that folder, it doesn't help.)

Re: Delete Junction confusion

Posted: 18 Aug 2022 11:29
by admin
Got it: It is not shown if it is a Mount Point. (I don't know why this decision was made; untypically there is no comment in the code.)

Re: Delete Junction confusion

Posted: 18 Aug 2022 11:35
by LittleBiG
admin wrote: 18 Aug 2022 11:29 Got it: It is not shown if it is a Mount Point. (I don't know why this decision was made; untypically there is no comment in the code.)
And is this a mount point? :? Same drive, the junction and the target are in the Documents as well.

Re: Delete Junction confusion

Posted: 18 Aug 2022 12:01
by PeterH
I'm sorry to say, but then, when windows deleted a junction together with it's data, *everybody* thought this is an error. Only MS kept it that way, and you said you have to follow (that error), as there may be someone who expects it. (Don't know how much data was lost for that...)
For later Versions MS, having recognized the problem, changed it's habbit.
Now people having to work on an old windows continue to delete their data by mistake - be it using WE or XY. (You said and say: they have a right to!)

Shouldn't you (sometimes) offer better solutions than MS? :evil:

You do recognize when someone deletes a junction - you could, instead of warn him, do what he will do if he understands the warning: delete the junction, as Junction/Delete Junction... does.
I expect even MS *not* to change this habit again!

Sorry: had to say that. :oops:

Re: Delete Junction confusion

Posted: 18 Aug 2022 12:22
by admin
PeterH wrote: 18 Aug 2022 12:01 I'm sorry to say, but then, when windows deleted a junction together with it's data, *everybody* thought this is an error. Only MS kept it that way, and you said you have to follow (that error), as there may be someone who expects it. (Don't know how much data was lost for that...)
For later Versions MS, having recognized the problem, changed it's habbit.
Now people having to work on an old windows continue to delete their data by mistake - be it using WE or XY. (You said and say: they have a right to!)

Shouldn't you (sometimes) offer better solutions than MS? :evil:

You do recognize when someone deletes a junction - you could, instead of warn him, do what he will do if he understands the warning: delete the junction, as Junction/Delete Junction... does.
I expect even MS *not* to change this habit again!

Sorry: had to say that. :oops:
Well, I think I did that. When you are now on XP you get a fat warning (see first post of this thread), plus you are offered the "Delete Junction..." command which does what modern Windows does.

Re: Delete Junction confusion

Posted: 18 Aug 2022 12:24
by admin
LittleBiG wrote: 18 Aug 2022 11:35
admin wrote: 18 Aug 2022 11:29 Got it: It is not shown if it is a Mount Point. (I don't know why this decision was made; untypically there is no comment in the code.)
And is this a mount point? :? Same drive, the junction and the target are in the Documents as well.
What is the target of that junction?