2
0
Nicolas Cannasse 18 жил өмнө
parent
commit
73326670d7
2 өөрчлөгдсөн 2 нэмэгдсэн , 1 устгасан
  1. 1 0
      doc/CHANGES.txt
  2. 1 1
      main.ml

+ 1 - 0
doc/CHANGES.txt

@@ -21,6 +21,7 @@
 	fixed very tricky typing bug with constructors inheritance
 	fixed some documentation related parser bug
 	fixed stack overflow with static setter
+	fixed package completion bug when -cp points to an not existing dir
 
 2007-07-25: 1.14
 	fixed no error when invalid "catch" expression

+ 1 - 1
main.ml

@@ -129,7 +129,7 @@ let read_type_path p cp =
 	let p = (match p with "flash" :: l when Plugin.defined "flash9" -> "flash9" :: l | _ -> p) in
 	List.iter (fun path ->
 		let dir = path ^ String.concat "/" p in
-		let r = Sys.readdir dir in
+		let r = (try Sys.readdir dir with _ -> [||]) in
 		Array.iter (fun f ->
 			if (Unix.stat (dir ^ "/" ^ f)).Unix.st_kind = Unix.S_DIR then begin
 				if f.[0] > 'a' && f.[0] < 'z' then packages := f :: !packages