From 3ed09520ad6402586238da22878453d95b558ac8 Mon Sep 17 00:00:00 2001 From: Matthias Fuchs Date: Sat, 28 May 2011 00:15:45 +0200 Subject: Disallow renaming to names containing '/', names being equal to "." or "..". BUG:211751 REVIEW:101454 --- src/views/renamedialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/views/renamedialog.cpp b/src/views/renamedialog.cpp index 810562a51..a14ba77b7 100644 --- a/src/views/renamedialog.cpp +++ b/src/views/renamedialog.cpp @@ -148,7 +148,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); -- cgit v1.3