diff options
Diffstat (limited to 'scss/compiler.py')
-rw-r--r-- | scss/compiler.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/scss/compiler.py b/scss/compiler.py index fb6e8a9..5ecd7f3 100644 --- a/scss/compiler.py +++ b/scss/compiler.py @@ -851,9 +851,11 @@ class Compilation(object): source = SourceFile.from_string(generated_code) else: - if path not in self.source_index: - self.add_source(SourceFile.from_filename(path)) - source = self.source_index[path] + if path in self.source_index: + source = self.source_index[path] + else: + source = SourceFile.from_filename(path) + self.add_source(source) if rule.namespace.has_import(source): # If already imported in this scope, skip @@ -898,7 +900,9 @@ class Compilation(object): dirname, basename = os.path.split(name) # Search relative to the importing file first - search_path = [os.path.dirname(rule.source_file.path)] + search_path = [ + os.path.normpath(os.path.abspath( + os.path.dirname(rule.source_file.path)))] search_path.extend(self.compiler.search_path) for prefix, suffix in product(('_', ''), search_exts): |