41
41
42
42
local function file_new (cwd , name )
43
43
local absolute_path = utils .path_join ({cwd , name })
44
- local relative_path = utils .path_relative (absolute_path , luv .cwd ())
45
44
local is_exec = luv .fs_access (absolute_path , ' X' )
46
45
return {
47
46
name = name ,
48
47
absolute_path = absolute_path ,
49
- relative_path = relative_path ,
50
48
executable = is_exec ,
51
49
extension = string.match (name , " .?[^.]+%.(.*)" ) or " " ,
52
50
match_name = path_to_matching_str (name ),
@@ -64,8 +62,6 @@ local function link_new(cwd, name)
64
62
--- I dont know if this is needed, because in my understanding, there isnt hard links in windows, but just to be sure i changed it.
65
63
local absolute_path = utils .path_join ({ cwd , name })
66
64
local link_to = luv .fs_realpath (absolute_path )
67
- -- if links to a file outside cwd, relative_path equals absolute_path
68
- local relative_path = link_to ~= nil and utils .path_relative (link_to , luv .cwd ()) or nil
69
65
local stat = luv .fs_stat (absolute_path )
70
66
local open , entries
71
67
if (link_to ~= nil ) and luv .fs_stat (link_to ).type == ' directory' then
@@ -81,7 +77,6 @@ local function link_new(cwd, name)
81
77
return {
82
78
name = name ,
83
79
absolute_path = absolute_path ,
84
- relative_path = relative_path ,
85
80
link_to = link_to ,
86
81
last_modified = last_modified ,
87
82
open = open ,
0 commit comments