Skip to content

Commit b686e27

Browse files
authored
Merge pull request #1433 from ghutchis/revert-validate-filenames
Revert validation of filenames.
2 parents b28b495 + af73338 commit b686e27

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

avogadro/io/fileformat.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ bool FileFormat::open(const std::string& fileName_, Operation mode_)
7676
appendError("Error opening file: " + fileName_);
7777
return false;
7878
}
79-
} else if (m_mode & Write && validateFileName(m_fileName)) {
79+
} else if (m_mode & Write) {
8080
auto* file = new ofstream(m_fileName.c_str(), std::ofstream::binary);
8181
m_out = file;
8282
if (file->is_open()) {

avogadro/qtgui/fileformatdialog.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,6 @@ FileFormatDialog::FormatFilePair FileFormatDialog::fileToWrite(
8686
if (fileName.isEmpty()) // user cancel
8787
return result;
8888

89-
if (FileFormat::validateFileName(fileName.toStdString()) == false) {
90-
QMessageBox::warning(
91-
parentWidget, caption,
92-
tr("The file name contains invalid characters. Please choose another "
93-
"file name."));
94-
continue;
95-
}
96-
9789
const Io::FileFormat* format = findFileFormat(
9890
parentWidget, caption, fileName, FileFormat::File | FileFormat::Write);
9991

0 commit comments

Comments
 (0)