-c option may be given relative or absolute path to configuration file; file references in this file will be relative to its position

This commit is contained in:
steve donovan 2011-08-21 19:01:31 +02:00
parent e680b44435
commit 226d3d372c
1 changed files with 6 additions and 2 deletions

View File

@ -184,8 +184,12 @@ local abspath = tools.abspath
-- a special case: 'ldoc .' can get all its parameters from config.ld
if args.file == '.' then
local err
config_dir,err = read_ldoc_config('./'..args.config)
if err then quit("no "..quote(args.config).." found here") end
config_dir,err = read_ldoc_config(args.config)
if err then quit("no "..quote(args.config).." found") end
local config_path = path.dirname(args.config)
if config_path ~= '' then
lfs.chdir(config_path)
end
config_is_read = true
args.file = ldoc.file or '.'
if args.file == '.' then