-
Notifications
You must be signed in to change notification settings - Fork 43
Open
Description
If I'm trying to save a file with a really strange name I got that error
System.ArgumentException : The filename, directory name, or volume label syntax is incorrect.
Parameter name: path
I can replicate the bug changing each letter to an X,
"xxxxxx x xxx xxxxx xxxxxxxxxxx xxxxx xxx xxxxxxxx xxxxxxxxx xxxxx xx xxxxxxxxxxx xxxxx . xxxxx xxxxxxx xx xxxx xxxxxxx xxxxx xxxxx, xx xxxxxxxxxx xxxx xxxxxxr xxxxxx xxxx xx xxxxxxx 2 xxxxxxxxs xxx xxxx xxxxx xxxxxxxxxx xxx xxx xxxx xxxxxxxxxxxx xxxxx..eml"
Just create a console app with this code and you got a crash.
internal class Program
{
static void Main(string[] args)
{
var tempPath = Path.GetTempPath();
var fileName = Path.Combine(tempPath, "xxxxxx x xxx xxxxx xxxxxxxxxxx xxxxx xxx xxxxxxxx xxxxxxxxx xxxxx xx xxxxxxxxxxx xxxxx . xxxxx xxxxxxx xx xxxx xxxxxxx xxxxx xxxxx, xx xxxxxxxxxx xxxx xxxxxxr xxxxxx xxxx xx xxxxxxx 2 xxxxxxxxs xxx xxxx xxxxx xxxxxxxxxx xxx xxx xxxx xxxxxxxxxxxx xxxxx..eml");
Pri.LongPath.File.WriteAllText(fileName, "Hello world");
}
}peteraritchie
Metadata
Metadata
Assignees
Labels
No labels