Page 1 of 1

Moving SymLink to Folder - moves contents of target folder

Posted: 13 May 2016 00:14
by DmFedorov
As it is known SymLink can be created to a folder and to a file.
If we talk about the SymLink to file, the SymLink behavior has no differences from the behavior of the shortcut.
If I will be copy, move, paste or delete SymLink, then will be deleted, pasted, moved and copied exactly SymLink but not object to which it is created.
Well with SymLink to files all is Ok.

Behavior of SymLink to Folder in XYplorer differs from the behavior of shortcut, that was created to folder.
From all actions - "copy, move, paste, delete" - works correctly only deleting.
If you delete SymLink to folder then really is deleted exactly SymLink to folder and not its object - content of Folder.
In all other cases (copy, move, paste), the actions are made NOT with link, but with the object to which this reference refers.

You can create a SymLink to the folder using XYplorer (in this case you will be sure that really was created a SymLink), then call Explorer and move the SymLink.
You will see that Explorer performs this operation correctly: it moves symlink to folder rather than its content.

By correcting this error, it is necessary to take into account the nuances.
For example, if you create the archive from a SymLink to folder, then will be created (zip, 7z, rar)-archive, where instead of a SymLink, in archive will be the target folder with its contents.

Added:
Probably it is necessary to tell that this bug exists from the very beginning of opportunity to create SymLink.
But in the beginning I saw only that only deleting of SymLink works incorrectly, and after it this bug was corrected.
Now it is time to correct also bug of SymLink to Folder by "copy, move, paste" of SymLink.

Re: Moving SymLink to Folder - moves contents of target fold

Posted: 13 May 2016 09:05
by admin
I compared the behavior of "copy" and it looks like Explorer (Win 8.1) does it the same way as XYplorer: Not the link is copied but the contents.

However, with "move" they behave differently indeed IF you use Custom Copy! Thanks for reporting that. :tup:

Re: Moving SymLink to Folder - moves contents of target fold

Posted: 13 May 2016 09:43
by DmFedorov
admin wrote:..Not the link is copied but the contents...
I apologize, with copying really so. I thought logically, and it was necessary simply to check.
Thanks for the quick reply.

Re: Moving SymLink to Folder - moves contents of target fold

Posted: 13 May 2016 10:18
by admin
FYI, I discovered a really weird Explorer bug (Win 8.1) when testing this:

When you move a Junction (Junction is always to a folder) into another folder, the contents are moved from the original source to the moved junction, which itself is auto-turned into a normal folder, while the "moved" junction actually stays in place pointing to nowhere (= empty). Even a touch more bizarre than XY's symlink bug. :)

Re: Moving SymLink to Folder - moves contents of target fold

Posted: 13 May 2016 10:31
by DmFedorov
admin wrote:FYI, I discovered a really weird Explorer bug (Win 8.1)...
I already told (when I wrote) that I thought logically.
But actually nobody knows (except you of course) what is "the correct behavior" for all these links (SymLinks, Junctions..).
I have opportunity to work with them only thanks to XYplorer.
Possibly even in such wrong behavior of Explorer (bug-behavior) there is too the own logic, but it is unknown to me.

Re: Moving SymLink to Folder - moves contents of target fold

Posted: 13 May 2016 10:40
by admin
I think it's a clear and pretty serious bug in Explorer. Nobody could ever desire this to happen under any circumstances -- at least not in my fantasy.

Generally I despise all this linking business in Windows which got IMO totally out of hand since Vista. It destroys the simplicity of the folder/file metaphor and turns a simple fool-proof system into a complex mess. :maf:

Re: Moving SymLink to Folder - moves contents of target fold

Posted: 13 May 2016 11:02
by DmFedorov
admin wrote:It destroys the simplicity of the folder/file metaphor and turns a simple fool-proof system into a complex mess. :maf:
O yes! (when it comes to Windows folder structure)
But it is very convenient for own needs. Well very much!