summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lua/rclone.lua2
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')