Symlinks, absolute vs. relative

Charles Dye

Super Moderator
Staff member
May 20, 2008
3,609
46
Albuquerque, NM
prospero.unm.edu
#1
Code:
C:\>ver /r

TCC  22.00.38   Windows 7 [Version 6.1.7601]
TCC Build 38   Windows 7 Build 7601  Service Pack 1
Registered to COE-DDPTMHQ1

C:\>dir c:\Test\

 Volume in drive C is Hard Drive   Serial number is 6218:b594
 Directory of  C:\Test\*

 2/22/2018   8:39         <DIR>    .
 2/22/2018   8:39         <DIR>    ..
 2/22/2018   8:39    <SYMLINKD>    TCmd [c:\bin\TCmd22]
                   0 bytes in 0 files and 3 dirs
     146,228,125,696 bytes free

C:\>dir c:\bin\tcmd*

 Volume in drive C is Hard Drive   Serial number is 6218:b594
 Directory of  C:\bin\tcmd*

12/08/2017  11:02    <SYMLINKD>    TCmd [TCmd22]
 9/08/2016   9:18         <DIR>    TCmd8
 9/08/2016   9:17         <DIR>    TCmd9
 7/28/2016  11:33         <DIR>    TCmd12
 2/16/2016  16:37         <DIR>    TCmd13
12/08/2017  15:49         <DIR>    TCmd16
10/09/2015  13:34         <DIR>    TCmd17
10/12/2015  12:39         <DIR>    TCmd18
 5/18/2016   8:35         <DIR>    TCmd19
12/13/2016  11:53         <DIR>    TCmd20
 3/20/2017  12:05         <DIR>    TCmd20.10
11/29/2017  15:32         <DIR>    TCmd21
 2/22/2018   8:35         <DIR>    TCmd22
                   0 bytes in 0 files and 13 dirs
     146,228,125,696 bytes free

C:\>truename c:\test\TCmd\
c:\bin\TCmd22

C:\>truename c:\bin\TCmd\
TCmd22

C:\>
TRUENAME, @TRUENAME, et al. resolve absolute symlinks as expected, but lose parentage for relative symlinks. I'm guessing the issue is in QueryTrueName(), or some routine which it calls.

Urgency: After ironing your shoelaces.