diff --git a/src/btllib/seq_reader.cpp b/src/btllib/seq_reader.cpp index 0ed5bf14..e1f815c9 100644 --- a/src/btllib/seq_reader.cpp +++ b/src/btllib/seq_reader.cpp @@ -59,6 +59,8 @@ SeqReader::SeqReader(const std::string& source_path, check_error(short_mode() && long_mode(), "SeqReader: short and long mode are mutually exclusive."); check_error(threads == 0, "SeqReader: Number of helper threads cannot be 0."); + check_error(source_path.find(' ') != std::string::npos, + "SeqReader: filename cannot include spaces"); start_processors(); { std::unique_lock lock(format_mutex); diff --git a/src/btllib/seq_writer.cpp b/src/btllib/seq_writer.cpp index 73dd396c..6069b4b9 100644 --- a/src/btllib/seq_writer.cpp +++ b/src/btllib/seq_writer.cpp @@ -16,6 +16,8 @@ SeqWriter::SeqWriter(const std::string& sink_path, Format format, bool append) , format(format) , headerchar(format == FASTA ? '>' : '@') { + check_error(sink_path.find(' ') != std::string::npos, + "SeqWriter: filename cannot include spaces"); } void