diff --git a/Assetic/Util/PathUtils.php b/Assetic/Util/PathUtils.php index fe9c630..88d5fd2 100644 --- a/Assetic/Util/PathUtils.php +++ b/Assetic/Util/PathUtils.php @@ -57,7 +57,7 @@ public static function resolveUrl(AssetInterface $asset, $url) return $url; } - $root = $asset->getSourceRoot(); + $root = dirname($asset->getSourceRoot().'/'.$asset->getSourcePath()); $path = dirname($asset->getTargetPath()); if ('.' === $path) { @@ -67,7 +67,7 @@ public static function resolveUrl(AssetInterface $asset, $url) } if (null !== $root) { - $image = $root.'/'.$image; + $image = $root.'/'.$url; } // cleanup local URLs