Don't use QFileInfo to get directory part of remote path. Refs #1094

* QFileInfo implicitly converts the path to the local OS's representation, and
  we want to preserve the native path format.
This commit is contained in:
baldurk
2018-09-07 13:41:43 +01:00
parent 6bfb426ab1
commit 5a475211f5
+9 -1
View File
@@ -931,9 +931,17 @@ void CaptureDialog::SetExecutableFilename(const rdcstr &filename)
ui->exePath->setText(fn);
if(m_Ctx.Replay().CurrentRemote())
m_Ctx.Replay().CurrentRemote()->lastCapturePath = QFileInfo(fn).absolutePath();
{
// remove the filename itself
int idx = fn.lastIndexOf(QLatin1Char('/'));
if(idx >= 0)
fn = fn.mid(0, idx);
m_Ctx.Replay().CurrentRemote()->lastCapturePath = fn;
}
else
{
m_Ctx.Config().LastCapturePath = QFileInfo(fn).absolutePath();
}
m_Ctx.Config().Save();
}