Fixed failure when running from within phar

This commit is contained in:
2017-01-10 17:11:23 +01:00
parent 70c510ff9b
commit 213997b0d0
2 changed files with 4 additions and 4 deletions

View File

@ -52,7 +52,7 @@ class PharBuilder
$size_tot = 0; $size_min = 0;
foreach ($this->files as $file) {
$i++;
$tp = dirname($file->src);
$tp = dirname($file->dest);
if (($tp!=$lp) && (IS_TTY)) {
$lp=$tp;
printf("\r\e[K%d/%d %s", $i, $t, $tp);
@ -66,7 +66,7 @@ class PharBuilder
} else {
$size_tot += filesize($file->src);
$size_min += filesize($file->src);
$phar->addFile($file->dest?:$file->src, $file->src);
$phar->addFile($file->src, $file->dest);
}
}
(IS_TTY) && printf("\r\e[K");