diff options
| author | David Faure <[email protected]> | 2012-07-20 12:09:04 +0200 |
|---|---|---|
| committer | David Faure <[email protected]> | 2012-07-20 12:09:04 +0200 |
| commit | 149975a0044f0a964c44b98e3228f4aeb6588d00 (patch) | |
| tree | 7a192910d95ae42cd06fd12446ccea6c3dd483e2 /src/views | |
| parent | 4a0454ff88a0900706826e7ed61aef405c73ba90 (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.cpp | 4 |
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; } |
