KSP-CKAN / CKAN

The Comprehensive Kerbal Archive Network
https://forum.kerbalspaceprogram.com/index.php?/topic/197082-*
Other
1.99k stars 348 forks source link

[Bug]: System.ArgumentException: The path is not of a legal form. #4245

Closed SpunogMor closed 3 weeks ago

SpunogMor commented 3 weeks ago

Is there an existing issue for this?

Operating System

Windows 10

CKAN Version

1.35.2

Games

KSP 1

Game Version

1.12.5

Did you make any manual changes to your game folder (i.e., not via CKAN)?

Manually installed mods previously with no problems.

Describe the bug

Any attempt to launch CKAN results in the following command line almost immediately, this has only started happening since I updated.

(I swear it's different to #3495)

Unhandled Exception: System.ArgumentException: The path is not of a legal form.
   at System.IO.Path.NewNormalizePath(String path, Int32 maxPathLength, Boolean expandShortPaths)
   at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
   at System.IO.Path.GetFullPathInternal(String path)
   at System.IO.DirectoryInfo.Init(String path, Boolean checkHost)
   at CKAN.NonSteamGame.NormalizeDir(String appPath)
   at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
   at System.Linq.Enumerable.<SelectManyIterator>d__17`2.MoveNext()
   at System.Linq.Enumerable.<ConcatIterator>d__59`1.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at CKAN.SteamLibrary..ctor(String libraryPath)
   at CKAN.GameInstanceManager..ctor(IUser user, IConfiguration configuration)
   at CKAN.CmdLine.MainClass.Execute(GameInstanceManager manager, CommonOptions opts, String[] args)
   at CKAN.CmdLine.MainClass.Main(String[] args)

Config file below.

Steps to reproduce

Any attempt to launch.

Relevant log output

{
  "AutoStartInstance": null,
  "DownloadCacheDir": "C:\\Users\\Owner\\AppData\\Local\\CKAN\\downloads",
  "CacheSizeLimit": null,
  "RefreshRate": null,
  "Language": "en-US",
  "GameInstances": [
    {
      "Name": "Auto KSP",
      "Path": "C:/Program Files (x86)/Steam/steamapps/common/Kerbal Space Program",
      "Game": "KSP"
    }
  ],
  "AuthTokens": {},
  "GlobalInstallFilters": [],
  "PreferredHosts": []
}
HebaruSan commented 3 weeks ago

Hi @SpunogMor, thanks for the report. This was fixed in 4b908935c43cf8e2af42bd3444139b03f11ce740, which you can access if you switch to the dev build in the settings, or download it from here: