Commit 281da180 authored by Johannes Kanig's avatar Johannes Kanig

O428-043 protect against absent plug-in dir

* why3config.ml
(plugins_auto) if plug-ins dir is absent, do not attempt to add plug-ins
parent 76fb6b30
......@@ -102,15 +102,19 @@ let plugins_auto_detection config =
let main = get_main config in
let main = set_plugins main [] in
let dir = Whyconf.pluginsdir main in
let files = Sys.readdir dir in
let fold main p =
if p.[0] == '.' then main else
let p = Filename.concat dir p in
try
install_plugin main p
with Exit -> main
let main =
if Sys.file_exists dir then
let files = Sys.readdir dir in
let fold main p =
if p.[0] == '.' then main else
let p = Filename.concat dir p in
try
install_plugin main p
with Exit -> main
in
Array.fold_left fold main files
else main
in
let main = Array.fold_left fold main files in
set_main config main
let main () =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment