BUGS related to full directory names >247 characters

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

Post Reply
jb
Senior Member
Senior Member
Posts: 412
Joined: 2003-02-09, 22:56 UTC
Location: Switzerland

BUGS related to full directory names >247 characters

Post by *jb »

Windows cannot create directories with full names >247 characters. In this case Total Commander 7.0pb2 pops up a message box saying "Error: Directory [<Name>] not created!". Below there are two buttons, "OK" and "As Administrator".
The same happens when copying directories or moving directories between two disk.

BUGS/shortcomings:
  1. If logging is enabled and you press "OK" then the error is NOT logged.
  2. The button "As Administrator" is completely useless since the maximal length of full directory names does not depend on the user.
  3. The error message does not indicate the cause of the failure although it would be much easier for TC to find out than for the user.
  4. The error message does not give the full name of the problematic directory. So if you copy a huge tree and the name of the directory occurs very many times then it can be quite difficult to identify the directory that causes the problem.
The Windows Explorer behaves slightly better in this case. It pops up a message box with the title "Error Copying/Moving File or Folder" and the text "Cannot remove folder <Name>: The filename or extension is too long.".

When moving directories within the same volume or renaming directories it is even worse. Directories with full names longer than 247 character are just lost silently! Actually it is Windows problem but nevertheless TC may work around it (because TC has higher quality standards :wink: ).
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48079
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

The button "As Administrator" is completely useless
Unfortunately I just get back a "denied" error - I have no idea why it was denied, because of rights problems or other problems. That's why I cannot hide the "As Administrator" button in this case, sorry.
Author of Total Commander
https://www.ghisler.com
jb
Senior Member
Senior Member
Posts: 412
Joined: 2003-02-09, 22:56 UTC
Location: Switzerland

Post by *jb »

Why don't you just check the length of the full directory name (and maybe do a few other checks) when you get a "denied" error?
The Win32 API may be indifferent in this respect, but after all the Windows Explorer is not.
Don't you check it because of:
different limits on different versions of Windows?
uncertain limits on future versions of Windows?
not important enough for the effort?
...?


But first of all I'm surprised by your selective reaction. I sorted the BUGS/shortcomings by severity. While points 2..4 can be considered only as shortcomings, point 1 is really a BUG of the new logging feature, isn't it :?:
By the way it seems to me that also other error messages related to the deletion of invalid shortcuts are missing in the log file. Currently I cannot recall the exact circumstances, but I will have an eye on it.
Post Reply