Skip to content
Snippets Groups Projects
Commit 4b7d724c authored by Langella Olivier's avatar Langella Olivier
Browse files

check that output directory is writable

parent 003e6b3f
No related branches found
No related tags found
No related merge requests found
......@@ -40,6 +40,13 @@ TandemBatchProcess::TandemBatchProcess(MainWindow * p_main_window, WorkMonitorIn
_tandem_run_batch = tandem_run_batch;
_p_monitor = p_monitor;
_tmp_database_file.setAutoRemove(true);
//check that output directory is writeable :
QFileInfo fi_in_dir(_tandem_run_batch._output_directory);
if (fi_in_dir.isDir() && fi_in_dir.isWritable()) {
} else {
throw pappso::PappsoException(QObject::tr("output directory is not writable. Please check permissions on %1").arg(fi_in_dir.absoluteFilePath()));
}
}
TandemBatchProcess::~TandemBatchProcess() {
......@@ -102,10 +109,10 @@ void TandemBatchProcess::run() {
// dir.path() returns the unique directory path
throw pappso::PappsoException(QObject::tr("problem creating temporary directory in %1\n").arg(tmp_dir.path()));
}
TandemParametersFile orig_parameter_file(_tandem_run_batch._preset_file);
_preset_file = QString("%1/%2").arg(tmp_dir.path()).arg(orig_parameter_file.getFilename());
TandemParametersFile new_parameter_file(_preset_file);
TandemParameters new_param = orig_parameter_file.getTandemParameters();
// <note type="input" label="spectrum, threads">1</note>
......@@ -124,8 +131,8 @@ void TandemBatchProcess::run() {
runOne(mz_file);
i++;
}
_p_monitor->finished(QObject::tr("%1 X!Tandem job(s) finished").arg(_tandem_run_batch._mz_file_list.size()));
_p_monitor->finished(QObject::tr("%1 X!Tandem job(s) finished").arg(_tandem_run_batch._mz_file_list.size()));
qDebug() << "TandemBatchProcess::run end" ;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment