Commit 28631adb authored by Jeroen Demeyer's avatar Jeroen Demeyer

Normalize filenames when calling parse_dependencies()

parent 719cf6e1
...@@ -398,7 +398,7 @@ def fully_qualified_name(filename): ...@@ -398,7 +398,7 @@ def fully_qualified_name(filename):
@cached_function @cached_function
def parse_dependencies(source_filename): def parse_dependencies(source_filename):
# Actual parsing is way to slow, so we use regular expressions. # Actual parsing is way too slow, so we use regular expressions.
# The only catch is that we must strip comments and string # The only catch is that we must strip comments and string
# literals ahead of time. # literals ahead of time.
fh = Utils.open_source_file(source_filename, error_handling='ignore') fh = Utils.open_source_file(source_filename, error_handling='ignore')
...@@ -435,6 +435,8 @@ class DependencyTree(object): ...@@ -435,6 +435,8 @@ class DependencyTree(object):
self._transitive_cache = {} self._transitive_cache = {}
def parse_dependencies(self, source_filename): def parse_dependencies(self, source_filename):
if path_exists(source_filename):
source_filename = os.path.normpath(source_filename)
return parse_dependencies(source_filename) return parse_dependencies(source_filename)
@cached_method @cached_method
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment