Skip to content

Commit c1c56aa

Browse files
committed
Update package exporter to 1.0.3
1 parent bdb5502 commit c1c56aa

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

Assets/PackageExporter/Editors/PackageExporterWindow.cs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)