Skip to content

Commit

Permalink
Save As...: Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
tedfelix committed Oct 22, 2024
1 parent 15db9d1 commit e548f71
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions src/gui/application/RosegardenMainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2216,27 +2216,8 @@ RosegardenMainWindow::launchSaveAsDialog(QString filter,
name += filterExtension;
}

// if we get a string like "/tmp/~/foo.rg" assume the last saved path was
// /tmp and the desired new path is ~ and try to doctor the string up, which
// may well fail, but it's better to try
// ??? Is this possible?
if (name.contains("~")) {
name = name.remove(0, name.indexOf("~") + 1);
name = name.prepend(QDir::homePath());

//RG_DEBUG << "doctored filename after '~' swap: " << name;

}

const QFileInfo info(name);

// ??? Is this possible?
if (info.isDir()) {
QMessageBox::warning(this, tr("Rosegarden"),
tr("You have specified a folder/directory."));
return "";
}

// Confirm overwrite.
if (info.exists()) {
int overwrite = QMessageBox::question(
Expand Down

0 comments on commit e548f71

Please sign in to comment.