File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
Assets/PackageExporter/Editors Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -336,9 +336,22 @@ private static string MakeValidExportPath(string path)
336336 /// </returns>
337337 private static bool MakeIgnore ( string path , string [ ] ignoreList )
338338 {
339+ // NOTE: Here is actually where we compare the path and ignore path.
340+
341+ // We use this to get rid of the first part of the path.
342+ // Cuz all path includes `Assets/` infront!
343+ const string assetPath = "Assets/" ;
344+
339345 foreach ( string ignorePath in ignoreList )
340346 {
341- if ( path . Contains ( ignorePath ) )
347+ // Path we use to compare.
348+ int len = ( ignorePath . Length > path . Length ) ? path . Length : ignorePath . Length ;
349+ if ( path . Length < assetPath . Length + len )
350+ len = path . Length - assetPath . Length ;
351+ // NOTE: Get rid of the `Assets/` infront of the path here!
352+ string pathCompare = path . Substring ( assetPath . Length , len ) ;
353+
354+ if ( pathCompare == ignorePath )
342355 return true ;
343356 }
344357
You can’t perform that action at this time.
0 commit comments