浏览代码

[Swf] consider .hx files when resolving valid paths (fixed issue #1389)

Simon Krajewski 12 年之前
父节点
当前提交
af8221aa8e
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      genswf.ml

+ 2 - 1
genswf.ml

@@ -105,7 +105,8 @@ let is_valid_path com pack name =
 			| None -> loop l
 			| Some (file,(_,a)) -> true
 	in
-	loop com.load_extern_type
+	let file = Printf.sprintf "%s/%s.hx" (String.concat "/" pack) name in
+	loop com.load_extern_type || (try ignore(Common.find_file com file); true with Not_found -> false)
 
 let build_class com c file =
 	let path = make_tpath c.hlc_name in