Browse Source

[java] Unix.readdir returns '.' and '..'. Ref #2916

Cauê Waneck 11 years ago
parent
commit
0382fcbe0e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      genjava.ml

+ 1 - 1
genjava.ml

@@ -3038,7 +3038,7 @@ let add_java_lib com file std =
 				(if String.ends_with file ".class" then
 					let file = String.sub file 0 (String.length file - 6) in
 					Hashtbl.add hxpack_to_jpack (jpath_to_hx(pack,file)) (pack,file)
-				else if (Unix.stat file).st_kind = S_DIR then
+				else if (Unix.stat file).st_kind = S_DIR && file <> "." && file <> ".." then
 					let path = path ^"/"^ file in
 					let pack = pack @ [file] in
 					iter_files (pack @ [file]) (Unix.opendir path) path);