From 591ebe80e540debd5b759148cf085912da519f41 Mon Sep 17 00:00:00 2001 From: Guido Ranzuglia granzuglia Date: Thu, 22 Mar 2012 17:38:55 +0000 Subject: [PATCH] saved temporary file in system temporary folder in order to avoid problem with os writing privileges. --- src/meshlabplugins/filter_ssynth/filter_ssynth.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/meshlabplugins/filter_ssynth/filter_ssynth.cpp b/src/meshlabplugins/filter_ssynth/filter_ssynth.cpp index 1449f5867..24d2bedd6 100644 --- a/src/meshlabplugins/filter_ssynth/filter_ssynth.cpp +++ b/src/meshlabplugins/filter_ssynth/filter_ssynth.cpp @@ -122,8 +122,9 @@ int FilterSSynth::getRequirements(QAction *) b.build(); renderer.end(); QString output=renderer.getOutput(); - QFile file("output.x3d"); - if(!file.open(QFile::WriteOnly | QFile::Text)){assert(0); return QString("");} + (*cb)(0, "Temp"); + QFile file(QDir::tempPath() + "/output.x3d"); + if(!file.open(QFile::WriteOnly | QFile::Text)){(*cb)(0, "PORCO DIO!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");; return QString("");} QTextStream outp(&file); outp << output; file.close();