┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/views
diff options
context:
space:
mode:
authorDavid Faure <[email protected]>2012-07-20 12:09:04 +0200
committerAmandeep Singh <[email protected]>2012-08-14 20:27:56 +0530
commitbbf6c3af888c0c674fca58a3c10182082638f9c0 (patch)
treecb18a1712f20fd0c076c0de134578b5bd0fb0f16 /src/views
parent0d2f099e86a6ba7cea2489a00e61144523e4417b (diff)
Fix bug 303375 - Dots in directory names treated as file extension.
Patch by Emmanuel Pescosta <[email protected]> BUG: 303375 REVIEW: 105575 FIXED-IN: 4.9.0
Diffstat (limited to 'src/views')
-rw-r--r--src/views/renamedialog.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/views/renamedialog.cpp b/src/views/renamedialog.cpp
index e232b9614..a91f91b1b 100644
--- a/src/views/renamedialog.cpp
+++ b/src/views/renamedialog.cpp
@@ -87,7 +87,9 @@ RenameDialog::RenameDialog(QWidget *parent, const KFileItemList& items) :
if (m_renameOneItem) {
const QString fileName = items.first().url().prettyUrl();
const QString extension = KMimeType::extractKnownExtension(fileName.toLower());
- if (extension.length() > 0) {
+
+ // If the current item is a directory, select the whole file name.
+ if ((extension.length() > 0) && !items.first().isDir()) {
// Don't select the extension
selectionLength -= extension.length() + 1;
}