From 0d1c1aeed9f76d0c3c1a51b58b576b6cdde4e29d Mon Sep 17 00:00:00 2001 From: tastytea Date: Wed, 1 Jul 2020 11:59:02 +0200 Subject: [PATCH] Add correct file extension to screenshot. --- src/git.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/git.cpp b/src/git.cpp index ed942cf..ee7cf35 100644 --- a/src/git.cpp +++ b/src/git.cpp @@ -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.