Skip to content
Snippets Groups Projects
Commit 691cde41 authored by dg's avatar dg
Browse files

improve

git-svn-id: http://svn.net-core.org/repos/t-engine4@6658 51575b47-30f0-44d4-a5cc-537603b46e54
parent 48c0bff5
No related branches found
No related tags found
No related merge requests found
......@@ -424,8 +424,9 @@ function _M:functionHelp(func, verbose)
if type(func) ~= "function" then return nil, "Can only give help on functions." end
local info = debug.getinfo(func)
-- Check the path exists
if not fs.exists(info.short_src) then return nil, ([[%s does not exist.]]):format(info.short_src) end
local f = fs.open(info.short_src, "r")
local fpath = string.gsub(info.source,"@","")
if not fs.exists(fpath) then return nil, ([[%s does not exist.]]):format(fpath) end
local f = fs.open(fpath, "r")
local lines = {}
local line_num = 0
local line
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment