diff --git a/bin/tools/config.py b/bin/tools/config.py index 68fd732090f..9e72fd6cfab 100644 --- a/bin/tools/config.py +++ b/bin/tools/config.py @@ -205,6 +205,11 @@ class configmanager(object): die(opt.translate_out and (not opt.db_name), "the i18n-export option cannot be used without the database (-d) option") + # Check if the config file exists (-c used, but not -s) + die(not opt.save and opt.config and not os.path.exists(opt.config), + "The config file '%s' selected with -c/--config doesn't exist, "\ + "use -s/--save if you want to generate it"%(opt.config)) + # place/search the config file on Win32 near the server installation # (../etc from the server) # if the server is run by an unprivileged user, he has to specify location of a config file where he has the rights to write,