2021-05-11 Fred Gleason <fredg@paravelsystems.com>

* Fixed a regression in the log rendering engine which caused
	a segfault when cleaning up temporary files.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason 2021-05-11 13:58:55 -04:00
parent 73312183d4
commit ab45e95c32
2 changed files with 7 additions and 5 deletions

View File

@ -21663,4 +21663,6 @@
2021-05-11 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in rdcastmanager(1) that could cause a segfault
when closing the 'List Feed' dialog.
2021-05-11 Fred Gleason <fredg@paravelsystems.com>
* Fixed a regression in the log rendering engine which caused
a segfault when cleaning up temporary files.

View File

@ -218,8 +218,8 @@ bool __RDRenderLogLine::GetCutFile(const QString &cutname,int start_pt,
void __RDRenderLogLine::DeleteCutFile(const QString &dest_filename) const
{
unlink(dest_filename.toUtf8());
QStringList f0=dest_filename.split("/");
f0.erase(f0.end());
QStringList f0=dest_filename.split("/",QString::SkipEmptyParts);
f0.removeLast();
rmdir(("/"+f0.join("/")).toUtf8());
}
@ -636,8 +636,8 @@ bool RDRenderer::ImportCart(const QString &srcfile,unsigned cartnum,int cutnum,
void RDRenderer::DeleteTempFile(const QString &filename) const
{
unlink(filename.toUtf8());
QStringList f0=filename.split("/");
f0.erase(f0.end());
QStringList f0=filename.split("/",QString::SkipEmptyParts);
f0.removeLast();
rmdir(("/"+f0.join("/")).toUtf8());
}