X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=development%2FWin32%2Fpackage.C;h=fd92e5cea260f8c230fc94e706649ac41bb166ca;hb=7afbc908eb0d6d412e3e5e03fae92ca0472a76d6;hp=6ab4082b2556e6ebad2e4724faee237c1fb6d5b7;hpb=2ad5f8cb4bc874d0a2d808427bf9cc1f84105a96;p=lyx.git diff --git a/development/Win32/package.C b/development/Win32/package.C index 6ab4082b25..fd92e5cea2 100644 --- a/development/Win32/package.C +++ b/development/Win32/package.C @@ -414,7 +414,12 @@ string const abs_path_from_command_line(string const & command_line) // Does the grunt work for abs_path_from_binary_name() string const get_binary_path(string const & exe) { - string const exe_path = os::internal_path(exe); + // The executable may have been invoked either with or + // without the .exe extension. + // Ensure that it is present. + string const as_internal_path = os::internal_path(exe); + string const exe_path = suffixIs(as_internal_path, ".exe") ? + as_internal_path : as_internal_path + ".exe"; if (os::is_absolute_path(exe_path)) return exe_path;