Explorar el Código

Minifier now checks oif input files exist

Taddeus Kroes hace 11 años
padre
commit
35720c3acc
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      main.ml

+ 2 - 0
main.ml

@@ -104,6 +104,8 @@ let parse_files = function
     let rec loop = function
       | [] -> []
       | filename :: tl ->
+        if not (Sys.file_exists filename) then
+          raise (Failure ("file " ^ filename ^ " does not exist"));
         let input = Util.input_all (open_in filename) in
         let stylesheet = Parse.parse_input filename input in
         (input, stylesheet) :: loop tl