TC doesn't allow to make shortcut of a directory in its subdirectory

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

TC doesn't allow to make shortcut of a directory in its subdirectory

Post by *MVV »

When I try to create a shortcut file for a directory in its subdirectory, I see error message "You cannot make shortcut of a directory to its own subdirectory".
It is wrong, shortcut file may be placed everywhere, it is just a file with specific contents.
User avatar
white
Power Member
Power Member
Posts: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: TC doesn't allow to make shortcut of a directory in its subdirectory

Post by *white »

Confirmed.
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: TC doesn't allow to make shortcut of a directory in its subdirectory

Post by *petermad »

Confirmed

I guess the problem arises because TC uses the same dialog for making a link as i does for moving folders - and you cannot move a folder to its oven subfolder.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: TC doesn't allow to make shortcut of a directory in its subdirectory

Post by *ghisler(Author) »

While it's technically possible, it's currently blocked to avoid infinite loop situations in some programs which automatically follow links. I don't remember which program this was, but I prefer to leave it as it is, sorry.
Author of Total Commander
https://www.ghisler.com
JOUBE
Power Member
Power Member
Posts: 1477
Joined: 2004-07-08, 08:58 UTC

Re: TC doesn't allow to make shortcut of a directory in its subdirectory

Post by *JOUBE »

ghisler(Author) wrote: 2023-12-17, 11:58 UTC While it's technically possible, it's currently blocked to avoid infinite loop situations in some programs which automatically follow links. I don't remember which program this was, but I prefer to leave it as it is, sorry.
That's okay in this way, especially since it's easy to create such a lnk file somewhere else and then move it to the desired location... So, move it to forum "will not be changed".
User avatar
white
Power Member
Power Member
Posts: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: TC doesn't allow to make shortcut of a directory in its subdirectory

Post by *white »

I don't like the error message:
You cannot copy/move/make shortcut of - a directory
[here: <folder>]
to its own subdirectory
[<folder>]
It makes more sense to me when writing it like this:
You cannot copy/move/-make shortcut of- the directory
[<folder>]
to its own subdirectory
[<folder>]
User avatar
AntonyD
Power Member
Power Member
Posts: 1249
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: TC doesn't allow to make shortcut of a directory in its subdirectory

Post by *AntonyD »

I don't understand something. The Total itself does not allow me to make this link, but at the same time, if I just copy the finished link file to where the Total does not allow me to do this, then everything will still work. So what's the point of this disallowing? If no one remembers any outdated programs that once didn't work there, then why should Total follow these restrictions now? If they are incorrect in nature?
#146217 personal license
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: TC doesn't allow to make shortcut of a directory in its subdirectory

Post by *ghisler(Author) »

So you would prefer if I would block even the copying or moving of lnk files? I don't think that this is a good idea either, if people absolutely need these links they should be able to use the workaround.
Author of Total Commander
https://www.ghisler.com
gdpr deleted 6
Power Member
Power Member
Posts: 872
Joined: 2013-09-04, 14:07 UTC

Re: TC doesn't allow to make shortcut of a directory in its subdirectory

Post by *gdpr deleted 6 »

ghisler(Author) wrote: 2023-12-18, 10:16 UTC So you would prefer if I would block even the copying or moving of lnk files? I don't think that this is a good idea either, if people absolutely need these links they should be able to use the workaround.
:? What... how... uh... what??? How did you manage to read AntonyD's comment in this way? :?:
No, that's not what AntonyD expressed at all. And no, it's not what he would prefer either. It's rather clear that AntonyD would prefer not to have this "blockage" which you already said you want to leave as is. Come on, you can't get that much clearer than: "So what's the point of this disallowing?"
User avatar
AntonyD
Power Member
Power Member
Posts: 1249
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: TC doesn't allow to make shortcut of a directory in its subdirectory

Post by *AntonyD »

2elgonzo
Thx! You've got it right!
#146217 personal license
JOUBE
Power Member
Power Member
Posts: 1477
Joined: 2004-07-08, 08:58 UTC

Re: TC doesn't allow to make shortcut of a directory in its subdirectory

Post by *JOUBE »

This thread should be moved to the forum "will not be changed" because it doesn't concern a bug. It is a decision by the Tc author to handle it this way. A suggestion can be created about this anyway.
User avatar
MaxX
Power Member
Power Member
Posts: 1029
Joined: 2012-03-23, 18:15 UTC
Location: UA

Re: TC doesn't allow to make shortcut of a directory in its subdirectory

Post by *MaxX »

> This thread should be moved to the forum "will not be changed"

No! That's a real bug. Bug by design. That must be fixed.
There's two reasons:
1. The .lnk file includes not only absolute path, but also has relative path too! And any moved link will get broken relative path inside. So you'll need to Alt+Enter and OK for each of .lnk this way.
2. There's no REAL restriction to make .lnk file in any place you can get write access.
Ukrainian Total Commander Translator. Feedback and discuss.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Re: TC doesn't allow to make shortcut of a directory in its subdirectory

Post by *MVV »

Are anyone of you really aware of any software that may come to an infinite loop just because of a .LNK file? What a stupid piece of software it would?
Windows shortcut file is just a FILE that has no relation to directory enumeration, it is not a directory link in any way, it can't be followed, it should never cause loops while scanning for subdirectories...
Only specifically written code can allow following paths from LNK files during directory enumeration, but it is completely stupid to do so, and I don't know any software that does it.

ghisler(Author),
I don't think that it is good to forbid completely legal and sometimes useful operation just because of a software that you can't even remembered and perhaps no one will ever meet. You know, I can make such shortcut in many other ways, and no way restricts me here, and it is sometimes really useful to have a shortcut to some parent in a deeply placed location. But it is weird that my file manager doesn't allow me to do this. This is really a bug, a known bug, and what's worse that it is by design...
JOUBE
Power Member
Power Member
Posts: 1477
Joined: 2004-07-08, 08:58 UTC

Re: TC doesn't allow to make shortcut of a directory in its subdirectory

Post by *JOUBE »

MVV wrote: 2023-12-26, 06:48 UTC ...forbid...

...But it is weird that my file manager doesn't allow me to do this....
The Tc will never forbid creating a file and moving it where it is desired. So, not a bug and no need to change anythng at this point.
User avatar
Hacker
Moderator
Moderator
Posts: 13067
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: TC doesn't allow to make shortcut of a directory in its subdirectory

Post by *Hacker »

MVV,
Are anyone of you really aware of any software that may come to an infinite loop just because of a .LNK file? What a stupid piece of software it would?
Not sure how serious you are :D
27.02.19 Release Total Commander 9.22 release candidate 1 (32/64)
01.10.18 Fixed: Function to check file system links (junctions, reparse points) for infinite loops didn't handle relative paths created e.g. via "mklink /D MyDirLink ..\MyDir" while in directory "C:\MyDir" (32/64)

07.04.09 Release Total Commander 7.50 Beta 17
03.04.09 Fixed: NTFS file system: Do not follow symlinks which point to themselves or a parent dir of the current dir in "calculate occupied space", copy/move, search, and synchronize dirs (avoids infinite loops)
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
Post Reply