diff --git a/tdir b/tdir index 387a81e..0ed1478 100755 --- a/tdir +++ b/tdir @@ -13,7 +13,7 @@ # Version info -VERSION = "$Id: tdir,v 1.57 2001/06/27 20:24:39 tundra Exp $" +VERSION = "$Id: tdir,v 1.58 2001/07/03 20:29:19 tundra Exp $" # Booleans @@ -102,8 +102,13 @@ DirList = [] FileList = [] for x in files: - if os.path.isdir(dir + "/" + x) and SHOWDIR: - DirList.append(x) + if (dir[-1] == '/') or (dir[-1] == '\\'): # This if/else sequence necessary because + dirstring = dir + x # 'tdir /' did not properly report directories + else: # on WinDoze32 systems which appears to + dirstring = dir + "/" + x # handle '//' or '\/' in files names very well. + if os.path.isdir(dirstring): + if SHOWDIR: + DirList.append(x) elif SHOWFILE: FileList.append(x) DisplayOutput(dir, DirList, FileList)