"Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: startIndex""
and I search the source code and Foundout where error occured:
int LocalShell.cs
char[] buf = new char[XXX];
int n = Win32.GetEnvironmentVariable("PATH", buf, buf.Length);
XXX is the buffer size for enviroment PATH,and my PATH is too long to filled in the buf,
I change XXX up to 8096 and Everything goes well.
No comments:
Post a Comment