leading and trailing '/' characters on Unix systems.
dirname = os.path.dirname(result)
for p in std_dirs:
# Ensure path doesn't end with path separator
- if p.endswith(os.sep):
- p = p.strip(os.sep)
+ p = p.rstrip(os.sep)
if p == dirname:
return [ ]
# so we have to figure out which one.
for p in paths:
# Ensure path doesn't end with path separator
- if p.endswith(os.sep):
- p = p.strip(os.sep)
+ p = p.rstrip(os.sep)
if p == dirname:
return [p]
else: