move __swap__.msr file to /Users/suter_a/.musrfit. This makes sure that it can be written even when musredit is started from a readonly destination.

This commit is contained in:
suter_a 2017-10-02 16:54:47 +02:00
parent 27a744c8f5
commit f83cf055be

View File

@ -2589,7 +2589,8 @@ void PTextEdit::musrSwapMsrMlog()
// get current file name // get current file name
QString currentFileName = *fFilenames.find( currentEditor() ); QString currentFileName = *fFilenames.find( currentEditor() );
QString swapFileName; QString swapFileName;
QString tempFileName = QString("__swap__.msr"); QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
QString tempFileName = QString("%1/.musrfit/__swap__.msr").arg(env.value("HOME"));
// check if it is a msr-, mlog-, or another file // check if it is a msr-, mlog-, or another file
int idx; int idx;