TC7rc5 - Directory Tree not correct when creating ..\newdir

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
white
Power Member
Power Member
Posts: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

TC7rc5 - Directory Tree not correct when creating ..\newdir

Post by *white »

When creating directories it is possible to specify a path including \..\ (parent dir) \...\ (grand parent dir) etc. See also here. However this messes up the Directory Tree (Alt-F10).

While not in the root directory, create a directory called "..\test" and then look at the Directory Tree (Alt-F10).

Also try "...\test" and "....\test" from within a sub directory and from within the root directory.
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

While not in the root directory, create a directory called "..\test" and then look at the Directory Tree (Alt-F10).
Confirmed - here the test directory is shown as a subdirectory to the first directory in the list - not in the root as it should be.
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:

Post by *ghisler(Author) »

Currently the directory name is stored in the tree file as you enter it. I will try to detect and remove groups of "..". I already have such a function in another location.
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

This should be fixed in TC7 final - please check!
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

Mmm.. Changed without testing?

Creating "..\test" and "...\test" from within a sub dir will corrupt the directory tree. See this screen shot.
Creating any directory including a trailing backslash gives similar results.
Creating directories "..\test", "...\test" and "....\test" in the root dir will not show up in the directory tree.
Creating a dir "....\test" from within a sub dir results in a access violation. See this screen shot.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I don't know WHAT you did, but I cannot reproduce your findings.

..\test is supported and works fine here!
...\test isn't currently supported - I get an error here.
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

ghisler(Author) wrote:I don't know WHAT you did, but I cannot reproduce your findings.
Nothing special. Just what I said.

I checked again.

1) I verified the TC 7.0 download file using the md5-file.
2) I unpacked the cab-file in a new dir.
3) I ran TC with parameters so TC would use ini-files in the directory where I unpacked TC.
4) I enabled the option to show hidden files.
5) I deleted "c:\treeinfo.wc".
6) I created a directory "a".
7) I pressed ALt-F10. A correct c:\treeinfo.wc file was created.
8) I closed the Tree Window.
9) I created a directory "a2". A corrupt line was added to c:\treeinfo.wc.
10) I pressed ALt-F10. Tree is corrupt.
11) I repeated step 8-10 creating directories "a3", "a4" and "a5". The contents of the first lines of c:\treeinfo.wc can be seen in this screen shot.
12) I changed directory to directory "a".
13) I created a directory "....\b" (4 dots!). The access violation error occurs!


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

Post by *petermad »

I can not confirm that - using your recipe.

9) I get a correct a2 entry in the treeinfo.wc file
10) My tree is OK
11) I get this in my treeinfo.wc file

Code: Select all

[a]
[a2]
[a3]
[a4]
[a5]
13) I get this message:
---------------------------
Total Commander
---------------------------
Error: Directory [....\b]
already exists!
Please specify a different name.
---------------------------
OK
---------------------------
Testet with TC7final, Win XP SP2 on FAT32
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:

Post by *ghisler(Author) »

I couldn't reproduce it so far, but found a problem with renaming folders. I assume that the problems are releated, so I will try to create a fix for TC 7.01.
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

TC7.01: Some things are fixed, but not all.

Still the access violation error when creating "c:\temp\....\newdir".

Still no entry in treeinfo.wc when creating "..\newdir" or "...\newdir" etc when you are in the root dir.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Still the access violation error when creating "c:\temp\....\newdir".
I don't get any access violation, just an error that the directory couldn't be created.
Still no entry in treeinfo.wc when creating "..\newdir" or "...\newdir" etc when you are in the root dir.
Why should ANYONE want to do such a thing?
Author of Total Commander
https://www.ghisler.com
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

Still the access violation error when creating "c:\temp\....\newdir".
This action creates two new directories in the c: root.
C:\Temp and C:\newdir
when performed on Windows 95.

On Windows XP I get the message that the directory already exists (a directory c:\newdir doesn't exist). Only c:\Temp is created.

Message on Windows XP:

Code: Select all

---------------------------
Total Commander
---------------------------
Fehler: Verzeichnis [c:\temp\....\newdir]
existiert bereits!
Bitte geben Sie einen anderen Namen an.
---------------------------
OK   
---------------------------
Last edited by Lefteous on 2007-06-22, 09:00 UTC, edited 1 time in total.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

"newdir" is not created here on Windows 2000. Maybe another new misfeature of Windows XP?
Author of Total Commander
https://www.ghisler.com
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2ghisler(Author)
"newdir" is not created here on Windows 2000. Maybe another new misfeature of Windows XP?
I never claimed that a directory newdir is created on Windows XP.

I can confirm that it crashes on Windows 98 - but only there!
It doesn't crash on Windows XP and Windows 95.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I see - the crash must be in Windows 98's implementation of CreateDirectory then. I will try to catch it in the next version. Btw, more than 2 dots in a row are a Unix-Thing, Windows doesn't seem to handle them anyway. Therefore normal users shouldn't usually enter such an invalid path.
Author of Total Commander
https://www.ghisler.com
Post Reply