Skip to content

Commit

Permalink
Draft: importDWG.py wrongly assumed that opt directory always exists …
Browse files Browse the repository at this point in the history
  • Loading branch information
Roy-043 committed Aug 30, 2023
1 parent da2bc3b commit 21824c7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Mod/Draft/importDWG.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,11 @@ def get_qcad_converter():
elif platform.system() == "Linux":
# /home/$USER/opt/qcad-3.28.1-trial-linux-qt5.14-x86_64/dwg2dwg
path = os.path.expandvars("/home/$USER/opt")
for sub in os.listdir(path):
if "qcad" in sub:
path = path + "/" + sub + "/" + "dwg2dwg"
break
if os.path.exists(path) and os.path.isdir(path):
for sub in os.listdir(path):
if "qcad" in sub:
path = path + "/" + sub + "/" + "dwg2dwg"
break
else: # for macOS
path = "/Applications/QCAD.app/Contents/Resources/dwg2dwg"

Expand Down

0 comments on commit 21824c7

Please sign in to comment.