File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ namespace UnityNuGet
3131 public class RegistryCache
3232 {
3333 public static readonly bool IsRunningOnAzure = ! string . IsNullOrEmpty ( Environment . GetEnvironmentVariable ( "WEBSITE_SITE_NAME" ) ) ;
34-
34+
3535 // Change this version number if the content of the packages are changed by an update of this class
3636 private const string CurrentRegistryVersion = "1.6.0" ;
3737
@@ -209,7 +209,7 @@ private async Task BuildInternal()
209209 // Clear the cache entirely
210210 _npmPackageRegistry . Reset ( ) ;
211211 }
212-
212+
213213 var regexFilter = Filter != null ? new Regex ( Filter , RegexOptions . IgnoreCase ) : null ;
214214 if ( Filter != null )
215215 {
@@ -744,7 +744,17 @@ RegistryEntry packageEntry
744744 // Collect the folders' metas
745745 {
746746 string ? fullPath = Path . GetDirectoryName ( fileInUnityPackage ) ;
747- string [ ] folders = fullPath ? . Split ( Path . DirectorySeparatorChar ) ?? Array . Empty < string > ( ) ;
747+ string [ ] folders ;
748+
749+ if ( ! string . IsNullOrEmpty ( fullPath ) )
750+ {
751+ folders = fullPath . Split ( Path . DirectorySeparatorChar ) ;
752+ }
753+ else
754+ {
755+ folders = Array . Empty < string > ( ) ;
756+ }
757+
748758 string folder = string . Empty ;
749759
750760 foreach ( var relative in folders )
You can’t perform that action at this time.
0 commit comments