NOTE: this modification need to be tested on Windows.
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3780
38d2e660-2303-0410-9eaa-
f027e97ec537
"""
try:
QApplication.instance().setOverrideCursor(Qt.WaitCursor)
- self.project.createBertosProject()
+ try:
+ # This operation can throw WindowsError, if the directory is
+ # locked.
+ self.project.createBertosProject()
+ except OSError, e:
+ QMessageBox.critical(self, self.tr("Error removing destination directory"), self.tr("Close all the application using this directory and retry."))
+ self.wizard().back()
+ return
finally:
QApplication.instance().restoreOverrideCursor()
self._plugin_dict = {}