diff options
Diffstat (limited to 'src/ui/widgets/FileTreeView.cpp')
-rw-r--r-- | src/ui/widgets/FileTreeView.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ui/widgets/FileTreeView.cpp b/src/ui/widgets/FileTreeView.cpp index 91536cdf..b0241b63 100644 --- a/src/ui/widgets/FileTreeView.cpp +++ b/src/ui/widgets/FileTreeView.cpp @@ -271,7 +271,7 @@ void FileTreeView::SlotRenameSelectedItem() { auto file_info = QFileInfo(selected_path_); auto new_name_path = file_info.absolutePath() + "/" + text; GF_UI_LOG_DEBUG("new filename path: {}", new_name_path); - if (QDir().rename(file_info.absoluteFilePath(), new_name_path)) { + if (!QDir().rename(file_info.absoluteFilePath(), new_name_path)) { QMessageBox::critical(this, tr("Error"), tr("Unable to rename the file or folder.")); return; |