Add correct file extension to screenshot.

This commit is contained in:
tastytea 2020-07-01 11:59:02 +02:00
parent 539c706459
commit 0d1c1aeed9
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07

View File

@ -149,8 +149,8 @@ void commit(const entry_type &entry)
if (!entry.screenshot_filepath.empty())
{
// TODO: Add real file extension.
fs::copy(entry.screenshot_filepath, basename + ".image");
const string extension{fs::path(entry.screenshot_filepath).extension()};
fs::copy(entry.screenshot_filepath, basename + extension);
}
// Add files.