OpenSCAD check for relative paths in open function as well

This commit is contained in:
Sebastian Hoogen
2013-07-10 16:43:22 +02:00
parent e52fb98e39
commit 7bf2aea963

View File

@@ -100,8 +100,11 @@ def insert(filename,docname):
importgroup = doc.addObject("App::DocumentObjectGroup",groupname)
if filename.lower().endswith('.scad'):
tmpfile=callopenscad(filename)
pathName = '' #https://github.com/openscad/openscad/issues/128
#pathName = os.getcwd() #https://github.com/openscad/openscad/issues/128
if workaroundforissue128needed():
pathName = '' #https://github.com/openscad/openscad/issues/128
#pathName = os.getcwd() #https://github.com/openscad/openscad/issues/128
else:
pathName = os.path.dirname(os.path.normpath(filename))
processcsg(tmpfile)
try:
os.unlink(tmpfile)