From 5696497bc0835106c2df9a9a9de1bbd75821d885 Mon Sep 17 00:00:00 2001 From: Adam Potolsky Date: Thu, 11 Jun 2015 17:40:26 -0700 Subject: [PATCH] Added code to throw an error if the plugin can't be deleted or written to #4696 --- src/gui/src/PluginManager.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/gui/src/PluginManager.cpp b/src/gui/src/PluginManager.cpp index a30d0056..31ec2858 100644 --- a/src/gui/src/PluginManager.cpp +++ b/src/gui/src/PluginManager.cpp @@ -115,7 +115,14 @@ void PluginManager::copyPlugins() QFile newFile(newName); if(newFile.exists()) { // If it does, delete it. TODO: Check to see if same and leave - newFile.remove(); + bool result = newFile.remove(); + if( !result ) { + emit error( + tr( "Unable to delete plugin:\n%1\n" + "Please stop synergy and run the wizard again.") + .arg(newName)); + return; + } } // make a copy of the plugin in the new location #if defined(Q_OS_WIN) @@ -125,10 +132,12 @@ void PluginManager::copyPlugins() #endif if ( !result ) { emit error( - tr("Failed to copy plugin '%1' to: %2\n%3") + tr("Failed to copy plugin '%1' to: %2\n%3\n" + "Please stop synergy and run the wizard again.") .arg(m_FileSysPluginList.at(i)) .arg(newName) .arg(file.errorString())); + return; } else { emit info(