qt: Set the full path of the filename in the new image dialog

This commit is contained in:
cold-brewed
2022-11-15 09:03:24 -05:00
parent 6a0b0a402f
commit 02314268dd

View File

@@ -328,6 +328,7 @@ void HarddiskDialog::onCreateNewFile() {
} }
QFileInfo fi(fileName); QFileInfo fi(fileName);
fileName = (fi.isRelative() && !fi.filePath().isEmpty()) ? usr_path + fi.filePath() : fi.filePath(); fileName = (fi.isRelative() && !fi.filePath().isEmpty()) ? usr_path + fi.filePath() : fi.filePath();
ui->fileField->setFileName(fileName);
QFile file(fileName); QFile file(fileName);
if (! file.open(QIODevice::WriteOnly)) { if (! file.open(QIODevice::WriteOnly)) {