FirelyTeam / Firely.Fhir.Packages

Other
2 stars 1 forks source link

Cache.GetPackageReferences() cannot deal with non-package folders #71

Closed mharthoorn closed 9 months ago

mharthoorn commented 1 year ago

Cache.GetPackageReferences() throws an error when there is a non-package folder in the cache directory.

System.ArgumentOutOfRangeException
  Message=Length cannot be less than zero. (Parameter 'length')
  Source=System.Private.CoreLib
  StackTrace:
   at System.String.Substring(Int32 startIndex, Int32 length)
   at Firely.Fhir.Packages.DiskPackageCache.parseFoldernameToReference(String foldername)
   at Firely.Fhir.Packages.DiskPackageCache.GetPackageReferences()

Expected: Just ignore the folder.