mirror of
https://github.com/fergalmoran/flameshot.git
synced 2026-01-23 03:37:30 +00:00
Fix save file name with '.'s in it (#1773)
Using QFileInfo::baseName() discards everything after the first ., so filenames like 1.2.3.4.png would be changed to 1.png. (See #1722). Changing this to QFileInfo::completeBaseName() only discards the suffix, so we have 1.2.3.4.jpg becoming 1.2.3.4.png, for example.
This commit is contained in:
@@ -142,7 +142,7 @@ QString ScreenshotSaver::ShowSaveFileDialog(QWidget* parent,
|
||||
dialog.selectedNameFilter().section('.', -1);
|
||||
selectedExtension.remove(QChar(')'));
|
||||
file_name =
|
||||
info.path() + QLatin1String("/") + info.baseName() +
|
||||
info.path() + QLatin1String("/") + info.completeBaseName() +
|
||||
QLatin1String(".") +
|
||||
selectedExtension; // recreate full filename with chosen suffix
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user