From: Matthias Fuchs Date: Fri, 27 May 2011 22:15:45 +0000 (+0200) Subject: Disallow renaming to names containing '/', names being equal to "." or "..". X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/3ed09520ad6402586238da22878453d95b558ac8?ds=sidebyside Disallow renaming to names containing '/', names being equal to "." or "..". BUG:211751 REVIEW:101454 --- 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);