Quellcode durchsuchen

php : FileSystem.fullPath() return null and not false when fails (patch by Ярослав Сиваков)

Franco Ponticelli vor 14 Jahren
Ursprung
Commit
807f47251c
1 geänderte Dateien mit 5 neuen und 1 gelöschten Zeilen
  1. 5 1
      std/php/FileSystem.hx

+ 5 - 1
std/php/FileSystem.hx

@@ -74,7 +74,11 @@ class FileSystem {
 	}
 
 	public static inline function fullPath( relpath : String ) : String {
-		return untyped __call__("realpath", relpath);
+		var p = untyped __call__("realpath", relpath);
+		if (untyped __physeq__(p, false))
+			return null;
+		else
+			return p;s
 	}
 
 	public static function kind( path : String ) : FileKind {