and another one, failed moves on the host need at least to delete the move origin.

This commit is contained in:
Axel Kittenberger 2010-11-29 00:21:17 +00:00
parent 15cde269c4
commit 19c697b28d
1 changed files with 8 additions and 2 deletions

View File

@ -1243,7 +1243,11 @@ local Sync = (function()
end
il = il - 1
end
log("Delay", "New ",nd.etype,":",path)
if nd.path2 then
log("Delay", "New ",nd.etype,":",nd.path,"->",nd.path2)
else
log("Delay", "New ",nd.etype,":",nd.path)
end
-- no block or combo
table.insert(self.delays, nd)
end
@ -2907,12 +2911,14 @@ local default_rsyncssh = {
local config = inlet.getConfig()
-- makes move local on host
-- if fails deletes the source...
if event.etype == 'Move' then
log("Normal", "Moving ",event.path," -> ",event2.path)
spawn(event, "/usr/bin/ssh",
config.host, "mv",
config.targetdir .. event.path,
config.targetdir .. event2.path)
config.targetdir .. event2.path,
"||", "rm", "-rf", config.targetdir .. event.path)
return
end