# HG changeset patch # User Jacob Dawid # Date 1341664101 -7200 # Node ID 9a355dfc77017f4e06c1ce6b17d516e87f6480e3 # Parent 422b0b2ce5f8062717baf4ec295e080e89ea3abe Fixed bug with GUI not starting the first time. * resource-manager.cc: Now creating config directory before attempting to copy a file to it. diff --git a/gui/src/resource-manager.cc b/gui/src/resource-manager.cc --- a/gui/src/resource-manager.cc +++ b/gui/src/resource-manager.cc @@ -17,6 +17,8 @@ #include "resource-manager.h" #include +#include + #include resource_manager resource_manager::_singleton; @@ -50,10 +52,12 @@ { QDesktopServices desktopServices; _home_path = desktopServices.storageLocation (QDesktopServices::HomeLocation); - QString settings_file = _home_path + "/.config/octave-gui/settings"; + QString settings_path = _home_path + "/.config/octave-gui/"; + QString settings_file = settings_path + "settings"; if (!QFile::exists (settings_file)) { + QDir("/").mkpath (settings_path); QFile::copy ("../default-settings", settings_file); _first_run = true; }