Skip to content

Commit

Permalink
Merge pull request #1 from boekkooi/rel-subdir
Browse files Browse the repository at this point in the history
Fixed a problem when getSourcePath can contain a directory
  • Loading branch information
Alexandre Salomé committed Feb 2, 2014
2 parents d8bb406 + 67697c6 commit 19a0aa3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Assetic/Util/PathUtils.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -67,7 +67,7 @@ public static function resolveUrl(AssetInterface $asset, $url)
}

if (null !== $root) {
$image = $root.'/'.$image;
$image = $root.'/'.$url;
}

// cleanup local URLs
Expand Down

0 comments on commit 19a0aa3

Please sign in to comment.