Fix directory path building to allow an absolute path. Closes #16

This commit is contained in:
Craig Davis 2014-03-24 10:25:18 -05:00
parent 5d3e062b96
commit 5203a5681c
2 changed files with 2 additions and 2 deletions

View File

@ -51,7 +51,7 @@ class HtmlCommand extends Command
{ {
$this->app = $this->getApplication(); $this->app = $this->getApplication();
$source = $input->getArgument('source'); $source = $input->getArgument('source');
$destination = trim($input->getArgument('destination'), DIRECTORY_SEPARATOR); $destination = rtrim($input->getArgument('destination'), DIRECTORY_SEPARATOR);
$template = $input->getOption('template'); $template = $input->getOption('template');
$refresh = $input->getOption('refresh'); $refresh = $input->getOption('refresh');
$destFilename = join(DIRECTORY_SEPARATOR, array($destination, pathinfo($source, PATHINFO_FILENAME) . '.html')); $destFilename = join(DIRECTORY_SEPARATOR, array($destination, pathinfo($source, PATHINFO_FILENAME) . '.html'));

View File

@ -36,7 +36,7 @@ class PdfCommand extends HtmlCommand
{ {
$this->app = $this->getApplication(); $this->app = $this->getApplication();
$source = $input->getArgument('source'); $source = $input->getArgument('source');
$destination = trim($input->getArgument('destination'), DIRECTORY_SEPARATOR); $destination = rtrim($input->getArgument('destination'), DIRECTORY_SEPARATOR);
$template = $input->getOption('template'); $template = $input->getOption('template');
$pdfSource = join(DIRECTORY_SEPARATOR, array($destination, '.tmp_pdf_source.html')); $pdfSource = join(DIRECTORY_SEPARATOR, array($destination, '.tmp_pdf_source.html'));
$destFilename = join(DIRECTORY_SEPARATOR, array($destination, pathinfo($source, PATHINFO_FILENAME) . '.pdf')); $destFilename = join(DIRECTORY_SEPARATOR, array($destination, pathinfo($source, PATHINFO_FILENAME) . '.pdf'));