diff --git a/twander.py b/twander.py index 25a9f21..c463450 100755 --- a/twander.py +++ b/twander.py @@ -6,7 +6,7 @@ # Program Information PROGNAME = "twander" -RCSID = "$Id: twander.py,v 3.213 2007/01/08 07:39:04 tundra Exp $" +RCSID = "$Id: twander.py,v 3.214 2007/01/08 17:36:14 tundra Exp $" VERSION = RCSID.split()[2] # Copyright Information @@ -4682,14 +4682,12 @@ # Include symlink details as necessary if details[0] == 'l': - # If the symlink points to a file - # in the same directory, just show - # the filename and not the whole path + # Strip trailing path separator + # This will be handled by the caller - f = os.path.realpath(currentdir + name) - r = os.path.split(f) - if r[0] == currentdir[:-1]: - f = r[1] + f = os.readlink(currentdir + name) + if f[-1] == PSEP: + f = f[:-1] details += SYMPTR + f