diff --git a/twander.py b/twander.py index f9e2efd..38e1e11 100755 --- a/twander.py +++ b/twander.py @@ -6,7 +6,7 @@ # Program Information PROGNAME = "twander" -RCSID = "$Id: twander.py,v 3.223 2007/01/11 06:43:10 tundra Exp $" +RCSID = "$Id: twander.py,v 3.224 2007/01/11 07:08:31 tundra Exp $" VERSION = RCSID.split()[2] # Copyright Information @@ -416,7 +416,8 @@ # Home directory -ENVHOME = os.getenv("HOME") + +ENVHOME = os.getenv("HOME") HOME = ENVHOME or STARTDIR # Get hostname @@ -2621,12 +2622,13 @@ # user's home directory. If so, substitute a shortcut to # save titlebar space. - CurrentDir = os.path.realpath(UI.CurrentDir) - envhome = os.path.realpath(ENVHOME) - if CurrentDir.startswith(envhome): - CurrentDir = CurrentDir.replace(envhome, HOMEDIRMARKER) - else: - CurrentDir = UI.CurrentDir + + CurrentDir = UI.CurrentDir + if ENVHOME: + CurrentDir = os.path.realpath(UI.CurrentDir) + envhome = os.path.realpath(ENVHOME) + if CurrentDir.startswith(envhome): + CurrentDir = CurrentDir.replace(envhome, HOMEDIRMARKER) # And make sure whatever we ended up with has an ending # separator character.