diff options
author | Daniel Weipert <code@drogueronin.de> | 2021-12-16 17:11:08 +0100 |
---|---|---|
committer | Daniel Weipert <code@drogueronin.de> | 2022-01-10 13:28:28 +0100 |
commit | 89cb11a19f4731bf4ef421174af1cf848ddced56 (patch) | |
tree | 60d5d366e1020d3b5e08e5882774054401929e00 /lua/rclone.lua | |
parent | c5d75fdf51e2163a1a82a1ad522c84a22f41838b (diff) |
Use vim.pesc to escape local_path pattern
Diffstat (limited to 'lua/rclone.lua')
-rw-r--r-- | lua/rclone.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lua/rclone.lua b/lua/rclone.lua index 2e18871..902d678 100644 --- a/lua/rclone.lua +++ b/lua/rclone.lua @@ -248,7 +248,7 @@ local function copyFile(options) -- build relative path to file for local and remote local Path = require('plenary.path') local local_file_path = Path:new(vim.fn.expand('%')):absolute() - local local_path_pattern = local_path:gsub('([^%w])', '%%%1') + local local_path_pattern = vim.pesc(local_path) if local_file_path:find(local_path_pattern) == nil then print('File path not in local path') |