From 078985b312e398772d36ff3292e3a02f18d8a24b Mon Sep 17 00:00:00 2001 From: Floris Bos Date: Thu, 3 Feb 2022 11:41:54 +0100 Subject: [PATCH] Fix "error on writing to disk" that sometimes appears after "cancel" - Do not generate "error on writing to disk" error if it is the result of the write being cancelled. - Mac: QProcess::execute(cmdline) -> QProcess::execute(cmd, args) to avoid depreceation warning. --- downloadthread.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/downloadthread.cpp b/downloadthread.cpp index d9741dfd4..1ce4a0613 100644 --- a/downloadthread.cpp +++ b/downloadthread.cpp @@ -196,7 +196,8 @@ bool DownloadThread::_openAndPrepareDevice() } else if (authopenresult == _file.authOpenError) { QString msg = tr("Error running authopen to gain access to disk device '%1'").arg(QString(_filename)); msg += "
"+tr("Please verify if 'Raspberry Pi Imager' is allowed access to 'removable volumes' in privacy settings (under 'files and folders' or alternatively give it 'full disk access')."); - QProcess::execute("open x-apple.systempreferences:com.apple.preference.security?Privacy_RemovableVolume"); + QStringList args("x-apple.systempreferences:com.apple.preference.security?Privacy_RemovableVolume"); + QProcess::execute("open", args); emit error(msg); return false; } @@ -439,6 +440,7 @@ void DownloadThread::run() } else #endif + if (!_cancelled) _onDownloadError(tr("Error writing file to disk")); break; case CURLE_ABORTED_BY_CALLBACK: