# HG changeset patch
# User Edouard Tisserant
# Date 1597925569 -7200
# Node ID 2f6dfb99d09488994bc5e9a95b4dd1ec05f6ee93
# Parent  440d74319a74f6f9ade1a12c94bf9fac52c587b1
SVGHMI: Behave when project path include spaces, and make more understandable error in case of problem extracting geometry with inkscape.

diff -r 440d74319a74 -r 2f6dfb99d094 svghmi/svghmi.py
--- a/svghmi/svghmi.py	Thu Aug 20 13:56:21 2020 +0200
+++ b/svghmi/svghmi.py	Thu Aug 20 14:12:49 2020 +0200
@@ -485,10 +485,13 @@
 
         inkpath = get_inkscape_path()
         svgpath = self._getSVGpath()
-        _status, result, _err_result = ProcessLogger(self.GetCTRoot().logger,
-                                                     inkpath + " -S " + svgpath,
+        status, result, _err_result = ProcessLogger(self.GetCTRoot().logger,
+                                                     '"' + inkpath + '" -S "' + svgpath + '"',
                                                      no_stdout=True,
                                                      no_stderr=True).spin()
+        if status != 0:
+            self.FatalError("SVGHMI : inkscape couldn't extract geometry from given SVG")
+
         res = []
         for line in result.split():
             strippedline = line.strip()