Hi to all, I want to introduce one little bug.
For example, I have a folder C:\tmp with subfolder C:\tmp\1 (lets say it's size is 1 MB) and it's junction as C:\tmp\2. When I try to calculate size of folder C:\tmp, TC says 2 MB while Windows Explorer says 1 MB. Mismatch.
Go on, make a junction to C:\tmp\1 as C:\tmp\1\1 (i.e. folder link inside this folder). Windows says folder size is 1 MB... But TC says... about 40-50 MB!!! (I think, later calculation is impossible because of long path)
So I think TC shouldn't calculate size of a junction (as Windows Explorer).
I.e. if a folder has inside only junctions to other folders, Windows says it has size 0 B. But in folder tree Windows tries to open infinity loop of junctions...
Copying such symbolic link also buggy - TC copies it with all of it's infinity subfolders. (but it is my buggy fault )
BTW, it isn't hard to check if a junction points to upfolder and make its analog. (but is it really what we need?)
Folder size calculation when it contains junction
Moderators: white, Hacker, petermad, Stefan2
- sqa_wizard
- Power Member
- Posts: 3864
- Joined: 2003-02-06, 11:41 UTC
- Location: Germany
Well, I don't call this a bug, but expected behaviour !
You told TC to count the bytes, an he did it.
Please copy C:\tmp to another drive and come back with the number of bytes copied
Don't call Windows Explorer to be right. All MS OS prior to Vista cannot handle junctions correctly: Deleting a junction using Windows Explorer will delete the content too (TC removes the junction entry only)
You told TC to count the bytes, an he did it.
Please copy C:\tmp to another drive and come back with the number of bytes copied
Don't call Windows Explorer to be right. All MS OS prior to Vista cannot handle junctions correctly: Deleting a junction using Windows Explorer will delete the content too (TC removes the junction entry only)
#5767 Personal license
It really depends on the concrete task which leads the user to find out the size of a directory. In all cases it's important to know if the directory is actually a junction. In your example Explorer displays another value but not 0 which means the junction must be in a subdirectory of the directory.
My DirSizeCalc plugin can be used to calculate
- the directory size including the size of all contained junctions
- the directory size excluding the size of junctions in subdirectories
- the directory size for normal directories, never calculate size for junctions
http://www.ghisler.ch/board/viewtopic.php?p=150981#150981
The bundled configuration tool can be used to configure the field as required.
My DirSizeCalc plugin can be used to calculate
- the directory size including the size of all contained junctions
- the directory size excluding the size of junctions in subdirectories
- the directory size for normal directories, never calculate size for junctions
http://www.ghisler.ch/board/viewtopic.php?p=150981#150981
The bundled configuration tool can be used to configure the field as required.
No, it's not. It depends on what you want to do with specific datas.So, it's size it is better not to calculate.
How complicated this issue is really shows a tool of the german magazin c't ctts.exe
Links to German articles
http://www.heise.de/ct/ftp/08/01/180/
http://www.heise.de/ct/faq/hotline/08/04/12.shtml
- ghisler(Author)
- Site Admin
- Posts: 48093
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Indeed TC is counting with the junctions here because they would be copied too when you press F5 instead of counting.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com