summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Fuchs <mat69@gmx.net>2011-05-27 22:15:45 (GMT)
committerMatthias Fuchs <mat69@gmx.net>2011-05-27 23:33:11 (GMT)
commit8dbc4b0752dc12121c37000c764a7e025daae4b7 (patch)
tree348c0715117b46f8c0f65ffc5341159e39ea91ab
parent30011f6985c2945b0d9c1b93a90d5e70551e0b2b (diff)
Backport: Disallow renaming to names containing '/', names being equal to "." or "..".
CCBUG:211751 REVIEW:101454 (cherry picked from commit 79ccd0202d106a9c16b79a20cd79831a60dc5393)
-rw-r--r--dolphin/src/views/renamedialog.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/dolphin/src/views/renamedialog.cpp b/dolphin/src/views/renamedialog.cpp
index 2b56d92..5d1673a 100644
--- a/dolphin/src/views/renamedialog.cpp
+++ b/dolphin/src/views/renamedialog.cpp
@@ -139,7 +139,7 @@ void RenameDialog::slotButtonClicked(int button)
void RenameDialog::slotTextChanged(const QString& newName)
{
- bool enable = !newName.isEmpty();
+ bool enable = !newName.isEmpty() && (newName != QLatin1String("..")) && (newName != QLatin1String(".")) && !newName.contains('/');
if (enable) {
if (m_renameOneItem) {
enable = enable && (newName != m_newName);