Suggestion: option to disregard "j...

2010-03-16
2013-04-23
  • Cerberus™
    Cerberus™
    2010-03-16

    If you know what a junction is, you can skip the following paragraph. I am using the program Link Shell Extension:
    http://schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html
    It allows me to make junctions (a special kind of hardlink) from one partition to another on an NTFS drive: if I make a junction called "junctionfolder" referring to "d:\program files" on my desktop, the "program files" folder is both on my desktop and on d:\ at the same time, as far as the system knows. When I delete a file in this folder, it doesn't matter how I came to the folder, whether I typed "c:\… desktop\junctionfolder" or "d:\program files": it will be gone, because there is, in reality, only one copy of that file on my disk.

    Windows explorer thinks that I have two folders at two different locations. So does HD Graph: the folder will be scanned twice, and the total amount of data will be doubled in HD Graph.

    However, I also use Everything, a desktop search program:
    http://www.voidtools.com
    Everything reads directly into the NTFS structure (I don't know how it works), and when I search for "program files", it gives only one folder, the original one; the junction just won't appear in its search results.

    Is it at all possible to make HD Graph count a junction<=>folder pair only once? That would be great! As it is, it says I have 30 GB on partition C:\, while its maximum size is actually only 10 GB.

     
  • jyl
    jyl
    2010-03-16

    I know about this problem since a long time (approximately year 2007), as you will see in the Readme file (https://sourceforge.net/projects/hdgraph/files/). And I'm still looking for an easy way to detect junction points. But it's quite difficult in .NET, and the small tests I have done shows that it increases significantly the scan time, even if there are no junction points. So the problem is quite difficult to solve… :/

     
  • Dan benDan
    Dan benDan
    2010-03-16

    Is this the same problem I'm having with WIN7 ?
    Application data/App data is everywhere (same contents). very confusing!

     
  • Cerberus™
    Cerberus™
    2010-03-23

    Ah, I overlooked that line in the readme file; I suppose it was a bit silly to think you wouldn't know about that.

    I just installed Windirsize again to test it, and I noticed it does detect Junction points, at the same fast speed as the HD Graph beta. I have no idea how. Too bad Windirstat doesn't have the superior tree view of HG Graph; Windirstat's visual display is ugly and hardly useful, because it doesn't demarcate folders, doesn't show directory structure, and doesn't show file/folder names. Long live HD Graph's view!

    One thing Windirstat does well: it subtracts all files and folder from total disk size, and displays what remains as "Unknown space".

     
  • Cerberus™
    Cerberus™
    2010-03-23

    Ah, I see now that it does display Unknown space on my other partition, D! But none on C, where Windirstat finds 700MB of Unknown space. Related to the junctions thing?

     
  • Cerberus™
    Cerberus™
    2010-03-23

    By "it" in my last post I meant "HD Graph"; too bad I can't edit my posts.

     
  • jyl
    jyl
    2010-03-23

    But none on C, where Windirstat finds 700MB of Unknown space. Related to the junctions thing?

    Yes, exactly : as some folders are counted twice, the total "logical" space of your C drive is bigger than the total physical space…

     

  • Anonymous
    2011-11-26

    I've decided not to wait for a response and added the functionality myself:
    http://www.ciobanu.org/public/HDGraph/

    The author can merge my changes if he decides they are any good. Seems to work :)

     
  • jyl
    jyl
    2011-11-27

    Hi Dorin,

    Thanks for your message and your code. I will take a serious look at your code and integrate it to HDGraph if it don't slow the scan too much (in which case reversing your option will do the trick)…
    After a "first and fast" look, I can already say that only a half of the problem is solved. Using "FileAttributes.ReparsePoint" is a good start, but it works only for the first levels of the tree. In fact, all the reparse points at a level higher than the "calculation max depth" (see the "advanced" button to define it) will still be followed in your proposal.
    Despite this, most people perhaps don't need or don't care to have more. I will study that.
    Thanks,

    Jean-Yves

     

  • Anonymous
    2011-11-27

    You are right. I've fixed it :)
    Same link:
    http://www.ciobanu.org/public/HDGraph/

     
  • jyl
    jyl
    2012-07-26

    Same link:
    http://www.ciobanu.org/public/HDGraph/

    Thank you very much for your code, it has been "nearly" merged into the main HDGraph branch. I say "nearly" because I didn't made a copy/paste but added few things. The new version 1.4.2 is available now.
    Sorry for the few updates but you know what everybody say : business first ! :)

    Cheers
    JYL

     
  • jyl
    jyl
    2012-07-26

    You are right. I've fixed it :)

    Hi, I wanted to thank you in the changeLog, but no way to find your name ! :p
    Is it ciobanu ?

    Cheers
    JYL

     

  • Anonymous
    2012-08-20

    My name is Dorin. No need to put me in changelog, I'm just glad I could help!