From dea9127ac280b1d41521a7675fa28d88d1803b38 Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Fri, 5 Feb 2016 16:40:53 -0200 Subject: [PATCH] Create the macro path if inexistant when saving a macro --- src/Gui/DlgMacroExecuteImp.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Gui/DlgMacroExecuteImp.cpp b/src/Gui/DlgMacroExecuteImp.cpp index 79d3e0ffd..d512e90f8 100644 --- a/src/Gui/DlgMacroExecuteImp.cpp +++ b/src/Gui/DlgMacroExecuteImp.cpp @@ -316,6 +316,10 @@ void DlgMacroExecuteImp::on_createButton_clicked() if (suffix != QLatin1String("fcmacro") && suffix != QLatin1String("py")) fn += QLatin1String(".FCMacro"); QDir dir(this->macroPath); + // create the macroPath if inexistant + if (!dir.exists()) { + dir.mkpath(this->macroPath); + } QFileInfo fi(dir, fn); if (fi.exists() && fi.isFile()) {