Skip to content

Commit

Permalink
Fix ArgumentOutOfRangeException
Browse files Browse the repository at this point in the history
Make sure the folderPath is larger than the project path before removing it:
#102
  • Loading branch information
AndyMUnity committed Nov 16, 2018
1 parent fe83f84 commit d434be0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Editor/InspectTab/AssetBundleInspectTab.cs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ private void BrowseForFolder(string folderPath = null)
{
var gamePath = System.IO.Path.GetFullPath(".");//TODO - FileUtil.GetProjectRelativePath??
gamePath = gamePath.Replace("\\", "/");
if (folderPath.StartsWith(gamePath))
if (folderPath.Length > gamePath.Length && folderPath.StartsWith(gamePath))
folderPath = folderPath.Remove(0, gamePath.Length + 1);

AddBundleFolder(folderPath);
Expand Down

0 comments on commit d434be0

Please sign in to comment.