]> _ Git - fluidbook_tools.git/commitdiff
wait #6002 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 7 Jun 2023 10:51:12 +0000 (12:51 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 7 Jun 2023 10:51:12 +0000 (12:51 +0200)
src/SVG/SVGTools.php

index 1aa7d843751e297cbf3c017601847495d4f4c244..240233cb01fefcee18a5c46cbc14ed26fd1bfb7e 100644 (file)
@@ -52,6 +52,9 @@ class SVGTools {
     public static function _optimizeSVG($in, $out) {
 
         $beforeOpt = str_replace('.svg', '.orig.svg', $in);
+        if (file_exists($beforeOpt) && is_link($beforeOpt)) {
+            unlink($beforeOpt);
+        }
         copy($in, $beforeOpt);
 
         $svg = shell_exec('timeout -s 1 120 ' . FluidbookTools::tools_path('svgcleaner/svgcleaner', true) . ' --allow-bigger-file --paths-coordinates-precision 3 --copy-on-error --stdout ' . $in);