Lua 5.2 compatibility changes - now working fine so far

This commit is contained in:
steve donovan 2012-02-29 19:20:57 +02:00
parent 5422edcffe
commit edd4a6b35e
1 changed files with 2 additions and 2 deletions

View File

@ -51,7 +51,7 @@ ldoc, a documentation generator for Lua, vs 1.1.0
`ldoc -c path/to/myconfig.ld .` reads options from `path/to/myconfig.ld` `ldoc -c path/to/myconfig.ld .` reads options from `path/to/myconfig.ld`
]] ]]
local args = lapp(usage) local args = lapp(usage)
local lfs = require 'lfs'
local doc = require 'ldoc.doc' local doc = require 'ldoc.doc'
local lang = require 'ldoc.lang' local lang = require 'ldoc.lang'
local tools = require 'ldoc.tools' local tools = require 'ldoc.tools'
@ -270,7 +270,7 @@ local function setup_package_base()
args.package = source_dir args.package = source_dir
elseif args.package == '..' then elseif args.package == '..' then
args.package = path.splitpath(source_dir) args.package = path.splitpath(source_dir)
elseif not args.package:find '[\//]' then elseif not args.package:find '[\\/]' then
local subdir,dir = path.splitpath(source_dir) local subdir,dir = path.splitpath(source_dir)
if dir == args.package then if dir == args.package then
args.package = subdir args.package = subdir