Browse Source

Fix filename not populated correctly

Fix up dd1bd8ad10.
Related #17279.
adaptive-webui-19844
Chocobo1 2 years ago
parent
commit
aadf961184
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 4
      src/gui/torrentcreatordialog.cpp

4
src/gui/torrentcreatordialog.cpp

@ -180,8 +180,8 @@ void TorrentCreatorDialog::onCreateButtonClicked() @@ -180,8 +180,8 @@ void TorrentCreatorDialog::onCreateButtonClicked()
}
// get save path
const Path savePath = m_storeLastSavePath.get(Utils::Fs::homePath() / Path(inputPath.filename() + u".torrent"));
Path destPath {QFileDialog::getSaveFileName(this, tr("Select where to save the new torrent"), savePath.data(), tr("Torrent Files (*.torrent)"))};
const Path lastSavePath = (m_storeLastSavePath.get(Utils::Fs::homePath()) / Path(inputPath.filename() + u".torrent"));
Path destPath {QFileDialog::getSaveFileName(this, tr("Select where to save the new torrent"), lastSavePath.data(), tr("Torrent Files (*.torrent)"))};
if (destPath.isEmpty())
return;
if (!destPath.hasExtension(TORRENT_FILE_EXTENSION))

Loading…
Cancel
Save