mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 12:33:06 +00:00
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:
parent
a91764b283
commit
fa4d6d78fe
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue