Skip to content

Commit

Permalink
- During startup, switch the omc working directory to TEMP/{OMShell,O…
Browse files Browse the repository at this point in the history
…MNotebook}/ so we have a directory with write access

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@8032 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Feb 26, 2011
1 parent 7308016 commit 7462b25
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion OMShell/oms.cpp
Expand Up @@ -1129,7 +1129,13 @@ bool OMS::startServer()
// get version no
QString getTempStr = "getTempDirectoryPath()";
delegate_->evalExpression( getTempStr );
cout << "Temp.Dir " << delegate_->getResult().toStdString() << std::endl;
QString tmpDir = delegate_->getResult()+"/OMShell/";
tmpDir.remove("\"");
if (!QDir().exists(tmpDir)) QDir().mkdir(tmpDir);
tmpDir = "cd(\"" + tmpDir + "\")";
cout << "Temp.Dir " << tmpDir.toStdString() << std::endl;
delegate_->evalExpression(tmpDir);
cout << "cdToTempDir: " << delegate_->getResult().toStdString() << std::endl;

QString getVersionStr = "getVersion()";
delegate_->evalExpression( getVersionStr );
Expand Down

0 comments on commit 7462b25

Please sign in to comment.