Skip to content

Commit

Permalink
Fix unconditional workspace dir recreation
Browse files Browse the repository at this point in the history
With this commit creating of workspace dir is done *after* loading
of settings, so the workspace path from settings is taken into
account.

Previous behaviour was to create workspace dir before loading of
settings which led to path from settings to be ignored.

See comment:
 ra3xdh#145 (comment)
  • Loading branch information
wawuwo committed Mar 23, 2024
1 parent b036931 commit ac5f105
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qucs/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -859,13 +859,13 @@ int main(int argc, char *argv[])

// default
QString QucsWorkdirPath = QDir::homePath()+QDir::toNativeSeparators ("/QucsWorkspace");
QDir().mkpath(QucsWorkdirPath);
QucsSettings.qucsWorkspaceDir.setPath(QucsWorkdirPath);
QucsSettings.QucsWorkDir.setPath(QucsSettings.qucsWorkspaceDir.canonicalPath());

// load existing settings (if any)
loadSettings();

QDir().mkpath(QucsSettings.qucsWorkspaceDir.absolutePath());
QDir().mkpath(QucsSettings.tempFilesDir.absolutePath());

// continue to set up overrides or default settings (some are saved on exit)
Expand Down

0 comments on commit ac5f105

Please sign in to comment.