From 365e1e6f56438614a0a7f8aedf1edbda36fb8884 Mon Sep 17 00:00:00 2001 From: cocopaw <223083270+cocopaw@users.noreply.github.com> Date: Thu, 7 Aug 2025 19:36:44 +1000 Subject: [PATCH] Added blocking of names ending in . --- src/gui/torrentcontentmodel.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/torrentcontentmodel.cpp b/src/gui/torrentcontentmodel.cpp index a3dbd561b..3c91137b3 100644 --- a/src/gui/torrentcontentmodel.cpp +++ b/src/gui/torrentcontentmodel.cpp @@ -302,9 +302,10 @@ bool TorrentContentModel::setData(const QModelIndex &index, const QVariant &valu { const QString currentName = item->name(); QString newName = value.toString().trimmed(); + if (currentName != newName) { - bool invalid = newName.isEmpty() || (newName == u"."_s) || (newName == u".."_s) || (newName.length() > 255); + bool invalid = newName.isEmpty() || (newName == u"."_s) || (newName == u".."_s) || (newName.length() > 255) || newName.endsWith(u'.'); if (!invalid) { for (const QChar &c : newName)