aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/widgets/FileTreeView.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-01-24 09:52:51 +0000
committersaturneric <[email protected]>2024-01-24 10:08:19 +0000
commit8cb450e916b15f50599d14ee36b707a2703423f5 (patch)
treed0df0aa24fab98114b6346c6836c145797119391 /src/ui/widgets/FileTreeView.cpp
parentfix: improve file page (diff)
downloadGpgFrontend-8cb450e916b15f50599d14ee36b707a2703423f5.tar.gz
GpgFrontend-8cb450e916b15f50599d14ee36b707a2703423f5.zip
fix: try to solve bugs at universal file operations
Diffstat (limited to 'src/ui/widgets/FileTreeView.cpp')
-rw-r--r--src/ui/widgets/FileTreeView.cpp2
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;