diff --git a/debian/rules b/debian/rules index 70a1bbb580957d1bf931ff8bd5c07adc1830c8a7..61b1df3708c20895cd7c97921c38d9dfa8aa25fe 100755 --- a/debian/rules +++ b/debian/rules @@ -13,3 +13,5 @@ override_dh_auto_configure: override_dh_auto_install: dh_auto_install -- DESTDIR=$(DESTDIR) + + diff --git a/src/gui/edit_tandem_preset_dialog/edittandempresetdialog.cpp b/src/gui/edit_tandem_preset_dialog/edittandempresetdialog.cpp index 59c8f8a6c4486eb3945ac9b34198ba104319cb3c..7c5d28e32c6dc3149157f6ee439f5e61164315de 100644 --- a/src/gui/edit_tandem_preset_dialog/edittandempresetdialog.cpp +++ b/src/gui/edit_tandem_preset_dialog/edittandempresetdialog.cpp @@ -103,7 +103,11 @@ void EditTandemPresetDialog::doSelectDir() { QString directory = QFileDialog::getExistingDirectory(this,tr("Choose preset directory"),_preset_directory ); + QFileInfo my_dir(directory); if (!directory.isEmpty() && ! directory.isNull()) { + if (!my_dir.isWritable()) { + throw pappso::PappsoException(QObject::tr("this directory is not writable, check permissions (%1)").arg(my_dir.absoluteFilePath())); + } _preset_directory = directory; fillPresetComboBox(); } diff --git a/src/input/xtandemsaxhandler.cpp b/src/input/xtandemsaxhandler.cpp index 2a15bc44b413ee558499360ef5cd3eb3f22346c7..7647f8155031c58a9a97042e9904389f9561fb46 100644 --- a/src/input/xtandemsaxhandler.cpp +++ b/src/input/xtandemsaxhandler.cpp @@ -79,11 +79,11 @@ bool XtandemSaxHandler::startElement(const QString & namespaceURI, const QString _current_text.clear(); } - catch (pappso::PappsoException exception_pappso) { + catch (pappso::PappsoException & exception_pappso) { _errorStr = QObject::tr("ERROR in XtandemSaxHandler::startElement tag %1, PAPPSO exception:\n%2").arg(qName).arg(exception_pappso.qwhat()); return false; } - catch (std::exception exception_std) { + catch (std::exception & exception_std) { _errorStr = QObject::tr("ERROR in XtandemSaxHandler::startElement tag %1, std exception:\n%2").arg(qName).arg(exception_std.what()); return false; } @@ -108,11 +108,11 @@ bool XtandemSaxHandler::endElement(const QString & namespaceURI, const QString & // else if ((_tag_stack.size() > 1) && // (_tag_stack[_tag_stack.size() - 2] == "detection_moulon")) } - catch (pappso::PappsoException exception_pappso) { + catch (pappso::PappsoException & exception_pappso) { _errorStr = QObject::tr("ERROR in XtandemSaxHandler::endElement tag %1, PAPPSO exception:\n%2").arg(qName).arg(exception_pappso.qwhat()); return false; } - catch (std::exception exception_std) { + catch (std::exception & exception_std) { _errorStr = QObject::tr("ERROR in XtandemSaxHandler::endElement tag %1, std exception:\n%2").arg(qName).arg(exception_std.what()); return false; }