┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/views
diff options
context:
space:
mode:
authorDavid Faure <[email protected]>2012-07-20 12:09:04 +0200
committerEmmanuel Pescosta <[email protected]>2012-08-13 22:25:49 +0200
commiteb14263c480ea37c306a9ae6a7fda64875cfe418 (patch)
tree33f99e846e49379919d1829e84c156d301cbe58f /src/views
parent5fbe52c1518037ad3dbb89ba18f2a318aee114f4 (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;
}