realtive paths do not start with a slash

This commit is contained in:
Axel Kittenberger 2017-01-04 11:24:55 +01:00
parent ff891441c8
commit 12d4f43d0f
1 changed files with 24 additions and 3 deletions

View File

@ -1283,7 +1283,14 @@ local InletFactory = ( function
(
event
)
return getPath( event )
local p = getPath( event )
if string.byte( path, 1 ) == 47
then
p = string.sub( p, 2, -1 )
end
return p
end,
--
@ -1294,7 +1301,14 @@ local InletFactory = ( function
(
event
)
return string.match( getPath( event ), '^(.*/)[^/]+/?' ) or ''
local p = getPath( event )
if string.byte( path, 1 ) == 47
then
p = string.sub( p, 2, -1 )
end
return string.match( p, '^(.*/)[^/]+/?' ) or ''
end,
--
@ -1305,7 +1319,14 @@ local InletFactory = ( function
(
event
)
return cutSlash( getPath( event ) )
local p = getPath( event )
if string.byte( path, 1 ) == 47
then
p = string.sub( p, 2, -1 )
end
return cutSlash( p )
end,
--