From d936b4288912c5514958f576c142ebe80bd37c6b Mon Sep 17 00:00:00 2001 From: kervala Date: Mon, 3 Oct 2016 17:18:25 +0200 Subject: [PATCH] Fixed: Create Menu directory before creating shortcuts --- .../tools/client/ryzom_installer/src/profile.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/code/ryzom/tools/client/ryzom_installer/src/profile.cpp b/code/ryzom/tools/client/ryzom_installer/src/profile.cpp index 58bde85df..45800a203 100644 --- a/code/ryzom/tools/client/ryzom_installer/src/profile.cpp +++ b/code/ryzom/tools/client/ryzom_installer/src/profile.cpp @@ -99,16 +99,28 @@ void CProfile::createShortcuts() const { QString shortcut = getClientDesktopShortcutFullPath(); + // make sure directory exists + QDir().mkpath(CConfigFile::getInstance()->getDesktopDirectory()); + // create desktop shortcut - createShortcut(shortcut, name, exe, profileArguments, icon, workingDir); + if (!createShortcut(shortcut, name, exe, profileArguments, icon, workingDir)) + { + qDebug() << "Unable to create desktop directory"; + } } if (menuShortcut) { QString shortcut = getClientMenuShortcutFullPath(); + // make sure directory exists + QDir().mkpath(CConfigFile::getInstance()->getMenuDirectory()); + // create menu shortcut - createShortcut(shortcut, name, exe, profileArguments, icon, workingDir); + if (!createShortcut(shortcut, name, exe, profileArguments, icon, workingDir)) + { + qDebug() << "Unable to create shortcut for client in menu"; + } } }