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.