Page 1 of 2

Deleting a NTFS hardlink/junction

Posted: 27 Jan 2006, 22:25
by antp
I already reported this by e-mail, in a previous version of Salamander the icons overlay for NTFS hardlinks/junctions was added, but in latest beta (11) a bug is still present:
When I delete a junction (= hardlink to a folder) without using recycle bin, (i.e. Shift+Del) Salamander clears folder contents before removing it.
But since it is only a link, it actually clears the contents of the target folder. Which is dangerous and useless (since the junction folder can be deleted witout emptying it: it is already empty).
I guess that since the overlay icon can be displayed, it should be also possible to detect that this is a junction and not a normal folder?

Posted: 27 Jan 2006, 22:47
by cincura.net
I think, that some special Delete operation would be useful. i.e Alt-Del, ...

And would be great to add ability for creating junction. :)

Re: Deleting a NTFS hardlink/junction

Posted: 28 Jan 2006, 03:35
by grymmjack
antp wrote:I already reported this by e-mail, in a previous version of Salamander the icons overlay for NTFS hardlinks/junctions was added, but in latest beta (11) a bug is still present:
When I delete a junction (= hardlink to a folder) without using recycle bin, (i.e. Shift+Del) Salamander clears folder contents before removing it.
But since it is only a link, it actually clears the contents of the target folder. Which is dangerous and useless (since the junction folder can be deleted witout emptying it: it is already empty).
I guess that since the overlay icon can be displayed, it should be also possible to detect that this is a junction and not a normal folder?
Yikes!

Agree, this needs fixed.

Posted: 29 Jan 2006, 23:02
by Petr Solin
Yes, I have it on my to-do list. :)

Re: Deleting a NTFS hardlink/junction

Posted: 12 Feb 2006, 19:07
by jis
antp wrote:...in a previous version of Salamander the icons overlay for NTFS hardlinks/junctions was added, ...
...I guess that since the overlay icon can be displayed, ...
This is for me really new information. I use hardlinks for many years, but I don't know anything about SS capabilities to show overlay icons for NTFS hardlinks/junctions. Please, can you tell me where did you get this information? I use mainly this tool http://www.elsdoerfer.info/ntfslink/.

Posted: 12 Feb 2006, 19:37
by antp
I use this tool too.
I discuted about that with Petr (I think) by e-mail actually. On my system Salamander shows the same overlay icons that Windows do.

Posted: 12 Feb 2006, 20:11
by jis
antp wrote:I use this tool too.
I discuted about that with Petr (I think) by e-mail actually. On my system Salamander shows the same overlay icons that Windows do.
It is strange, because on my system Salamander doesn't show overlay icons from NTFS Link Windows Shell Extension. I must open actual folder from SS in Windows Explorer by Shift-F3 when I want to see overlay icons. Explanation for other forum users: NTFS Link Windows Shell Extension hooks into Windows Explorer and provide extended functionality for creating and using hard links, as well as junction points on NTFS file systems.

Posted: 12 Feb 2006, 22:31
by antp
Actually here it uses the icon that I defined for shortcuts, but since it is similar to the one that I defined for hardlinks I never noticied that it was the wrong icon.

Posted: 12 Feb 2006, 23:58
by jis
antp wrote:Actually here it uses the icon that I defined for shortcuts, but since it is similar to the one that I defined for hardlinks I never noticied that it was the wrong icon.
I am sorry, but I don't understand: So, does your Salamander show overlay icons from NTFS Link Windows Shell Extension, or not?

Posted: 13 Feb 2006, 15:24
by Petr Solin
Salamander displays standard link overlay icon for directories with FILE_ATTRIBUTE_REPARSE_POINT attribute. Icon overlays which are used e.g. by Tortoise CVS are not supported yet, we have it on our to-do list.

Posted: 13 Feb 2006, 22:44
by antp
jis wrote:
antp wrote:Actually here it uses the icon that I defined for shortcuts, but since it is similar to the one that I defined for hardlinks I never noticied that it was the wrong icon.
I am sorry, but I don't understand: So, does your Salamander show overlay icons from NTFS Link Windows Shell Extension, or not?
It does not show the icons defined in the NTFS Link Extension. It uses Windows' shortcut icon, though it recognizes the folder as a folder and not as a shortcut.

Posted: 13 Feb 2006, 23:32
by cincura.net
antp wrote: It does not show the icons defined in the NTFS Link Extension. It uses Windows' shortcut icon, though it recognizes the folder as a folder and not as a shortcut.
My idea is, that there's a problem with these extensions. There are extending the 'shell', but SS uses pure WinAPI, so it's able to recognize only things, which are served to it with these API functions.

PS: I'll be very happy when SS will be able to show Tortoise SVN, ... overlay icons. 8)

Posted: 13 Feb 2006, 23:51
by antp
Overlay icons is not a big problem I think, though it would of course be nice and useful to have them.
But the NTFS junction are a feature that exists and works without extra tool. The extension is there only to allow to create them easily (the only junction that you can create is a link folder->partition).
Deleting the whole partition contents when you want to remove the link is more dangerous :D

Posted: 13 Feb 2006, 23:58
by cincura.net
antp wrote:But the NTFS junction are a feature that exists and works without extra tool. The extension is there only to allow to create them easily.
Yeah, you're right. I'm using the utility from Win resource kit and/or the juction tool from sysinternals. It allows me to create symlinks somehow I want. :)
antp wrote: The only junction that you can create is a link folder->partition.
Deleting the partition contents when you want to remove the link is more dangerous :D
:twisted: Yes, it's little dangerous. I've no idea, why MS allows easily to create this and for folder<->folder you need RK or 3rd party util.

That's why I suggest to use special shortcut for deleting this 'points' (and maybe some shortcut for creating it? :wink: ).

Posted: 14 Feb 2006, 00:25
by antp
Shift+Del coult delete the folder used for link without emptying its contents.
Creating these junction could be nice too, maybe with the drag&drop contextual menu since it is already created by Salamander (the NTFSlink extension is hidden in the "Other..." menu item).

It is possible to easily delete these junctions without emptying their "contents". Some bad install programs do that :
c:\programs\software-name
"programs" is junction point to another parition.
They try to delete each folder until they reach the root without checking if there is something in it, since a delete fail for non-empty folders.
"programs" folder can be deleted easily since it is an empty folder used for a link. So the uninstall program removes it, and then I have to recreate the link to the partition :D