summaryrefslogtreecommitdiffstats
path: root/Lib/trace.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-08-14 21:55:28 (GMT)
committerGeorg Brandl <georg@python.org>2006-08-14 21:55:28 (GMT)
commit7a1af770b9fbf73e967fac9ad224e6caad62e4cc (patch)
treecfad3edf8b6b64b3b8e5c78b12beeaabda7363e0 /Lib/trace.py
parent85fec5910474197439be7e62bf1136b3ee57b05c (diff)
downloadcpython-7a1af770b9fbf73e967fac9ad224e6caad62e4cc.zip
cpython-7a1af770b9fbf73e967fac9ad224e6caad62e4cc.tar.gz
cpython-7a1af770b9fbf73e967fac9ad224e6caad62e4cc.tar.bz2
Patch #1536071: trace.py should now find the full module name of a
file correctly even on Windows.
Diffstat (limited to 'Lib/trace.py')
-rw-r--r--Lib/trace.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/trace.py b/Lib/trace.py
index db36e1d..35edac2 100644
--- a/Lib/trace.py
+++ b/Lib/trace.py
@@ -179,9 +179,11 @@ def fullmodname(path):
# looking in sys.path for the longest matching prefix. We'll
# assume that the rest is the package name.
+ comparepath = os.path.normcase(path)
longest = ""
for dir in sys.path:
- if path.startswith(dir) and path[len(dir)] == os.path.sep:
+ dir = os.path.normcase(dir)
+ if comparepath.startswith(dir) and comparepath[len(dir)] == os.sep:
if len(dir) > len(longest):
longest = dir