Fixed losing of extension when rename image from clipboard.

This commit is contained in:
23rd
2026-03-04 11:08:19 +03:00
parent f1bf8e554e
commit 66a5e67cbf
@@ -128,6 +128,9 @@ void RenameFileBox(
rpl::single(QString()),
currentName));
const auto extension = [&] {
if (currentName.isEmpty()) {
return u".png"_q;
}
const auto dot = currentName.lastIndexOf('.');
return (dot >= 0) ? currentName.mid(dot) : QString();
}();