Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert validation of filenames. #1433

Merged
merged 1 commit into from Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion avogadro/io/fileformat.cpp
Expand Up @@ -76,7 +76,7 @@ bool FileFormat::open(const std::string& fileName_, Operation mode_)
appendError("Error opening file: " + fileName_);
return false;
}
} else if (m_mode & Write && validateFileName(m_fileName)) {
} else if (m_mode & Write) {
auto* file = new ofstream(m_fileName.c_str(), std::ofstream::binary);
m_out = file;
if (file->is_open()) {
Expand Down
8 changes: 0 additions & 8 deletions avogadro/qtgui/fileformatdialog.cpp
Expand Up @@ -86,14 +86,6 @@ FileFormatDialog::FormatFilePair FileFormatDialog::fileToWrite(
if (fileName.isEmpty()) // user cancel
return result;

if (FileFormat::validateFileName(fileName.toStdString()) == false) {
QMessageBox::warning(
parentWidget, caption,
tr("The file name contains invalid characters. Please choose another "
"file name."));
continue;
}

const Io::FileFormat* format = findFileFormat(
parentWidget, caption, fileName, FileFormat::File | FileFormat::Write);

Expand Down