|
@@ -37,14 +37,22 @@ public static class DataObjectExtensions
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- string text = data.GetText();
|
|
|
-
|
|
|
- if (Directory.Exists(text) || File.Exists(text))
|
|
|
+ try
|
|
|
+ {
|
|
|
+ var text = data.GetText();
|
|
|
+ if (Directory.Exists(text) || File.Exists(text))
|
|
|
+ {
|
|
|
+ path = text;
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch(InvalidCastException ex) // bug on x11
|
|
|
{
|
|
|
- path = text;
|
|
|
- return true;
|
|
|
+ path = null;
|
|
|
+ return false;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
path = null;
|
|
|
return false;
|
|
|
}
|