Skip to content

Commit

Permalink
Update Compass.php
Browse files Browse the repository at this point in the history
Using load_paths in ResolvePath
  • Loading branch information
Steven John Lange committed Jul 11, 2014
1 parent ffe2278 commit 729b3f3
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions Extensions/Compass/Compass.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,25 +135,7 @@ public static function resolveExtensionPath($callerImport, $parser, $syntax = 's
*/
public static function compassResolvePath($file)
{
if ($file{0} == '/') {
return $file;
}
if (!$path = realpath($file)) {
$path = SassScriptFunction::$context->node->token->filename;
$path = substr($path, 0, strrpos($path, '/')) . '/';
$path = $path . $file;
$last = '';
while ($path != $last) {
$last = $path;
$path = preg_replace('`(^|/)(?!\.\./)([^/]+)/\.\./`', '$1', $path);
}
$path = realpath($path);
}
if ($path) {
return $path;
}

return false;
return ($path = SassFile::get_file($file, SassParser::$instance, false))?$path[0]:false;
}

public static function compassImageWidth($file)
Expand Down

0 comments on commit 729b3f3

Please sign in to comment.