In some cases, you can induce unity to build a game without providing a file extension. For instance, when using https://game.ci and building for linux, it currently produces an executable without a file extension by default.
This breaks here:
|
string buildName = buildPath.Name.Replace(buildPath.Extension, ""); |
because String.Replace will throw an exception if the first argument is empty.
Ideally, that would be guarded against by not doing the replace if buildPath.Extension is empty.