Skip to content

Commit

Permalink
Merge pull request #15 from mervick/patch-1
Browse files Browse the repository at this point in the history
Removed the repeated slashes from the result file
  • Loading branch information
nizsheanez committed Jun 10, 2015
2 parents a1f831e + 4d27b3a commit 5689155
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Converter.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,11 @@ public function convert($asset, $basePath)
}

$parserConfig = ArrayHelper::merge($this->defaultParsersOptions[$ext], $this->parsers[$ext]);
if ($this->destinationDir) {
$this->destinationDir .= '/';
}
$resultFile = $this->destinationDir . substr($asset, 0, $pos + 1) . $parserConfig['output'];

$from = $basePath . '/' . $asset;
$this->destinationDir = $this->destinationDir ? trim($this->destinationDir, '/') : '';
$resultFile = $this->destinationDir . '/' . ltrim(substr($asset, 0, $pos + 1), '/') . $parserConfig['output'];

$from = $basePath . '/' . ltrim($asset, '/');
$to = $basePath . '/' . $resultFile;

if (!$this->needRecompile($from, $to)) {
Expand Down

0 comments on commit 5689155

Please sign in to comment.