From: Orgad Shaneh Date: Thu, 18 Aug 2022 17:19:39 +0000 (+0300) Subject: fix: Strip .exe from executable name on version output (#1135) X-Git-Tag: v4.7~107 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3bf1cce93bf014a44b7c8759fdb9ef6ca41ed1b0;p=thirdparty%2Fccache.git fix: Strip .exe from executable name on version output (#1135) --- diff --git a/src/core/mainoptions.cpp b/src/core/mainoptions.cpp index 936689c84..cff3f8848 100644 --- a/src/core/mainoptions.cpp +++ b/src/core/mainoptions.cpp @@ -586,8 +586,14 @@ process_main_options(int argc, const char* const* argv) break; case 'V': // --version - PRINT_RAW(stdout, get_version_text(Util::base_name(argv[0]))); + { + std::string_view name = Util::base_name(argv[0]); +#ifdef _WIN32 + name = Util::remove_extension(name); +#endif + PRINT_RAW(stdout, get_version_text(name)); break; + } case 'x': // --show-compression {