Răsfoiți Sursa

Merge pull request #3211 from qifun/patch-2

Avoid IOException
Cauê Waneck 11 ani în urmă
părinte
comite
8a0b40e01c
1 a modificat fișierele cu 6 adăugiri și 1 ștergeri
  1. 6 1
      std/java/_std/sys/FileSystem.hx

+ 6 - 1
std/java/_std/sys/FileSystem.hx

@@ -61,7 +61,12 @@ class FileSystem {
 
 
 	public static function fullPath( relPath : String ) : String
 	public static function fullPath( relPath : String ) : String
 	{
 	{
-		return new File(relPath).getCanonicalPath();
+		try {
+			return new File(relPath).getCanonicalPath();
+		} catch (e: java.io.IOException) {
+			throw new java.lang.RuntimeException(e);
+			return null;
+		}
 	}
 	}
 
 
 	public static function absPath ( relPath : String ) : String {
 	public static function absPath ( relPath : String ) : String {