mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Fixed losing of extension when rename image from clipboard.
This commit is contained in:
@@ -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();
|
||||
}();
|
||||
|
||||
Reference in New Issue
Block a user