summaryrefslogtreecommitdiff
path: root/lua/telescope/path.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/telescope/path.lua')
-rw-r--r--lua/telescope/path.lua17
1 files changed, 8 insertions, 9 deletions
diff --git a/lua/telescope/path.lua b/lua/telescope/path.lua
index cdfbc48..0a47a83 100644
--- a/lua/telescope/path.lua
+++ b/lua/telescope/path.lua
@@ -4,7 +4,6 @@ local path = {}
path.separator = package.config:sub(1, 1)
path.home = vim.fn.expand("~")
-
path.make_relative = function(filepath, cwd)
if not cwd or not filepath then return filepath end
@@ -83,14 +82,14 @@ path.read_file = function(filepath)
end
path.read_file_async = function(filepath, callback)
- vim.loop.fs_open(filepath, "r", 438, function(err, fd)
- assert(not err, err)
- vim.loop.fs_fstat(fd, function(err, stat)
- assert(not err, err)
- vim.loop.fs_read(fd, stat.size, 0, function(err, data)
- assert(not err, err)
- vim.loop.fs_close(fd, function(err)
- assert(not err, err)
+ vim.loop.fs_open(filepath, "r", 438, function(err_open, fd)
+ assert(not err_open, err_open)
+ vim.loop.fs_fstat(fd, function(err_fstat, stat)
+ assert(not err_fstat, err_fstat)
+ vim.loop.fs_read(fd, stat.size, 0, function(err_read, data)
+ assert(not err_read, err_read)
+ vim.loop.fs_close(fd, function(err_close)
+ assert(not err_close, err_close)
return callback(data)
end)
end)