none
Annoying Bug in FindLinks: It returns the wrong drive letter :-( RRS feed

  • Question

  • Hello

    FindLinks (and PowerShell, btw), returns the wrong drive letter if FindLinks is working on a Directory which is Hardlinked by itself.

    Example:

    • We have this Directory Junction:
      c:\Temp » D:\Working\Temp
    created by:
    mklink /J C:\Temp D:\Working\Temp
    • We have this Hard Link:
      c:\Temp\Source.txt » C:\Temp\Target.txt
    created by
    mklink /H c:\Temp\Source.txt c:\Temp\Target.txt

    Unfortunately, FindLinks assumes that all found HardLinks must be on the same Drive as the source - and it returns the Invalid SubDir C:\Working\…

    FindLinks64.exe C:\Temp\Source.txt
    C:\Temp\Source.txt
      Index:  xxx
      Links:  1
    
    Linking file:
    C:\Working\Temp\Source.txt
    C:\Working\Temp\Target.txt

    The result should be:

    Either: C:\Temp\Target.txt

    Or: D:\Working\Temp\Source.txt

    But C:\Working\… is an error.

    It would really help if such tools would be tested by some basic Unit Tests... there are not so many possible combinations.

    Kind regards,

    Thomas




    • Edited by Jehoschua Tuesday, September 18, 2018 3:36 PM Annoying M$ 'Editor'
    Tuesday, September 18, 2018 3:26 PM