From: Vincent Vanwaelscappel Date: Thu, 21 Oct 2021 10:25:16 +0000 (+0200) Subject: wait #4809 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=aa23cd870b2cd7cbcc8918826cb041d0dc6f780b;p=fluidbook_tools.git wait #4809 @0.5 --- diff --git a/composer.json b/composer.json index d407f21..69d25df 100644 --- a/composer.json +++ b/composer.json @@ -32,8 +32,8 @@ "ext-gd": "*", "laravel/framework": "~5.8|^6.0|^7.0|^8.0", "cubist/util": "dev-master", + "cubist/pdf": "dev-master", "barryvdh/laravel-debugbar": "^3.6", - "spatie/laravel-medialibrary": "^9.0", - "cubist/pdf": "dev-master" + "spatie/laravel-medialibrary": "^9.0" } } diff --git a/src/Compiler/Compiler.php b/src/Compiler/Compiler.php index 299e246..b61eede 100644 --- a/src/Compiler/Compiler.php +++ b/src/Compiler/Compiler.php @@ -165,7 +165,7 @@ class Compiler implements ShouldQueue, ShouldBeUnique start_measure('Compile fluidbook'); if ($this->wdir === '') { - $this->wdir = resource_path('fluidbook/working/'); + $this->wdir = storage_path('fluidbook/working/'); Files::mkdir($this->wdir); } diff --git a/src/Compiler/Styles.php b/src/Compiler/Styles.php index 7219829..8dc8c1a 100644 --- a/src/Compiler/Styles.php +++ b/src/Compiler/Styles.php @@ -361,20 +361,24 @@ trait Styles { $path = trim($path); $path = trim($path, '/'); + if (!$path) { return false; } - $p = $this->stub . '/_theme/' . $path; + + $p = $this->stub . '_theme/' . $path; if (file_exists($p)) { $this->vdir->copy($p, 'data/' . $path); return $p; } + $po = str_replace('.svg', '.o.svg', $p); if (file_exists($po)) { copy($po, $p); $this->vdir->copy($p, 'data/' . $path); return $p; } + throw new \Exception("Missing theme file : " . $path . ' (' . $p . ')'); return false; }