From d58957f63d36e2da41f6f839a2d94cb0db4c8125 Mon Sep 17 00:00:00 2001 From: Guillaume Melquiond Date: Mon, 14 Dec 2015 10:44:22 +0100 Subject: Remove some occurrences of Unix.opendir. --- lib/system.ml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/system.ml b/lib/system.ml index b57c02a14f..b641aad91b 100644 --- a/lib/system.ml +++ b/lib/system.ml @@ -64,9 +64,7 @@ let apply_subdir f path name = | _ -> () let process_directory f path = - let dirh = Unix.opendir path in - try while true do apply_subdir f path (Unix.readdir dirh) done - with End_of_file -> Unix.closedir dirh + Array.iter (apply_subdir f path) (Sys.readdir path) let process_subdirectories f path = let f = function FileDir (path,base) -> f path base | FileRegular _ -> () in -- cgit v1.2.3