mirror of
https://github.com/octoleo/lsyncd.git
synced 2024-06-06 10:20:52 +00:00
escape filenames for mv commands
This commit is contained in:
parent
9a065476d1
commit
f17e82ce5c
|
@ -1002,7 +1002,7 @@ local Excludes = (function()
|
||||||
--
|
--
|
||||||
local function toLuaPattern(p)
|
local function toLuaPattern(p)
|
||||||
local o = p
|
local o = p
|
||||||
p = string.gsub(p, "%%", "%%")
|
p = string.gsub(p, "%%", "%%") -- TODO check
|
||||||
p = string.gsub(p, "%^", "%%^")
|
p = string.gsub(p, "%^", "%%^")
|
||||||
p = string.gsub(p, "%$", "%%$")
|
p = string.gsub(p, "%$", "%%$")
|
||||||
p = string.gsub(p, "%(", "%%(")
|
p = string.gsub(p, "%(", "%%(")
|
||||||
|
@ -3245,9 +3245,10 @@ local default_rsyncssh = {
|
||||||
log("Normal", "Moving ",event.path," -> ",event2.path)
|
log("Normal", "Moving ",event.path," -> ",event2.path)
|
||||||
spawn(event, "/usr/bin/ssh",
|
spawn(event, "/usr/bin/ssh",
|
||||||
config.host, "mv",
|
config.host, "mv",
|
||||||
config.targetdir .. event.path,
|
'\"' .. config.targetdir .. event.path .. '\"',
|
||||||
config.targetdir .. event2.path,
|
'\"' .. config.targetdir .. event2.path .. '\"',
|
||||||
"||", "rm", "-rf", config.targetdir .. event.path)
|
"||", "rm", "-rf",
|
||||||
|
'\"' .. config.targetdir .. event.path .. '\"')
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user