Skip to content

Commit b0bfcc6

Browse files
authored
Merge pull request #172 from tehwalris/fix-separator-crash
Fix Utilities.cs crash with Unix directory separator
2 parents 21a1f24 + 7320438 commit b0bfcc6

File tree

1 file changed

+1
-1
lines changed
  • Source/MSBuildTools.Unity/Packages/com.microsoft.msbuildforunity/Editor/ProjectGenerator/Scripts

1 file changed

+1
-1
lines changed

Source/MSBuildTools.Unity/Packages/com.microsoft.msbuildforunity/Editor/ProjectGenerator/Scripts/Utilities.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ private static AssetImporter GetAssetImporter(string path)
136136
if (relativePath.Contains('@'))
137137
{
138138
string[] parts = relativePath.Split('@');
139-
relativePath = parts[0] + parts[1].Substring(parts[1].IndexOf('\\'));
139+
relativePath = parts[0] + parts[1].Substring(parts[1].IndexOf(Path.DirectorySeparatorChar));
140140
}
141141
}
142142
else if (path.Contains(PackagesPath))

0 commit comments

Comments
 (0)