aboutsummaryrefslogtreecommitdiff
path: root/lumina-fileinfo
diff options
context:
space:
mode:
Diffstat (limited to 'lumina-fileinfo')
-rw-r--r--lumina-fileinfo/dialog.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/lumina-fileinfo/dialog.cpp b/lumina-fileinfo/dialog.cpp
index b0217db8..0c7c3a6a 100644
--- a/lumina-fileinfo/dialog.cpp
+++ b/lumina-fileinfo/dialog.cpp
@@ -284,17 +284,26 @@ void Dialog::on_pbApply_clicked()
//hack required to update the icon on the desktop
QTemporaryFile tempFile ;
tempFile.setAutoRemove(false);
+ tempFile.setFileTemplate("/tmp/lumina-XXXXXX");
tempFile.open();
tempFile.close();
- //TODO: capture errors
QString cmd = "mv";
cmd = cmd + " " + desktopFileName + " " + tempFile.fileName();
int ret = LUtils::runCmd(cmd);
+ if (ret !=0 ) {
+ qDebug() << "Problem to execute:" << cmd;
+ QMessageBox::critical(this, tr("Problem to write to disk"), tr("We have a problem to execute the following command:") + cmd);
+
+ }
cmd = "mv";
cmd = cmd + " " + tempFile.fileName() + " " + desktopFileName;
ret = LUtils::runCmd(cmd);
+ if (ret !=0 ) {
+ qDebug() << "Problem to execute:" << cmd;
+ QMessageBox::critical(this, tr("Problem to write to disk"), tr("We have a problem to execute the following command:") + cmd);
+ }
}
bgstack15