diff options
-rw-r--r-- | src/mainwindow.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 5279610f..d792c6ed 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1018,7 +1018,10 @@ void MainWindow::renamePassword() { bool ok; QString file = getFile(ui->treeView->currentIndex(), false); QString filePath = QFileInfo(file).path(); - QString fileName = QFileInfo(file).baseName(); + QString fileName = QFileInfo(file).fileName(); + if (fileName.endsWith(".gpg", Qt::CaseInsensitive)) + fileName.chop(4); + QString newName = QInputDialog::getText(this, tr("Rename file"), tr("Rename File To: "), QLineEdit::Normal, fileName, &ok); |