1
0
mirror of https://github.com/ToxicCrack/PrintABrick.git synced 2025-05-16 20:30:09 -07:00

Fix StlRenderer

This commit is contained in:
Unknown 2017-06-27 12:40:50 +02:00
parent eaefb6c3d1
commit a6fab6c0be
2 changed files with 3 additions and 3 deletions

View File

@ -41,7 +41,7 @@ class ImageLoader extends BaseLoader
$path = $this->rebrickableDownloadUrl."ldraw/parts_{$color}.zip"; $path = $this->rebrickableDownloadUrl."ldraw/parts_{$color}.zip";
$file = $this->downloadFile($path); $file = $this->downloadFile($path);
$zip = new \ZipArchive($file); $zip = new \ZipArchive();
if ($zip->open($file) === true) { if ($zip->open($file) === true) {
$this->writeOutput([ $this->writeOutput([
@ -83,7 +83,7 @@ class ImageLoader extends BaseLoader
try { try {
$this->loadModelImage($this->mediaFilesystem->getAdapter()->getPathPrefix().$model->getPath()); $this->loadModelImage($this->mediaFilesystem->getAdapter()->getPathPrefix().$model->getPath());
} catch (\Exception $e) { } catch (\Exception $e) {
$this->logger->error('Error rendering model '.$model->getId().' image'); $this->logger->error('Error rendering model '.$model->getId().' image', [$e->getMessage()]);
} }
$this->progressBar->advance(); $this->progressBar->advance();
} }

View File

@ -175,7 +175,7 @@ class StlRendererService
} }
if (!file_exists($to)) { if (!file_exists($to)) {
mkdir($to); mkdir($to, 0777, true);
} }
$filename = pathinfo($file)['filename']; $filename = pathinfo($file)['filename'];