Fix filenotfound exception on drag&drop

Dragging from a deeply nested file & folder truncates the filename (eg
from winrar), causing an invalid path to be passed.
This commit is contained in:
Kurt 2017-07-10 18:57:03 -07:00
parent a91764b283
commit fa4d6d78fe

View file

@ -225,6 +225,8 @@ namespace PKHeX.WinForms.Controls
return false;
string file = files[0];
FileInfo fi = new FileInfo(file);
if (!fi.Exists)
return false;
if (!PKX.IsPKM(fi.Length) && !MysteryGift.IsMysteryGift(fi.Length))
{
RequestExternalDragDrop?.Invoke(this, e); // pass thru