Force removal of rsync tmp dir
Force delete entry to prevent any potentail failures when trying to clean up the tmp dir from rsync
This commit is contained in:
parent
401a571642
commit
3b540e502f
|
@ -234,7 +234,7 @@ module VagrantPlugins
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
ensure
|
ensure
|
||||||
FileUtils.remove_entry_secure(controlpath) if controlpath
|
FileUtils.remove_entry_secure(controlpath, true) if controlpath
|
||||||
end
|
end
|
||||||
|
|
||||||
# Check if rsync versions support using chown option
|
# Check if rsync versions support using chown option
|
||||||
|
|
|
@ -292,7 +292,7 @@ describe VagrantPlugins::SyncedFolderRSync::RsyncHelper do
|
||||||
expect(args[9]).to include("ControlPath=/tmp/vagrant-rsync-12345")
|
expect(args[9]).to include("ControlPath=/tmp/vagrant-rsync-12345")
|
||||||
}.and_return(result)
|
}.and_return(result)
|
||||||
|
|
||||||
expect(FileUtils).to receive(:remove_entry_secure).with("/tmp/vagrant-rsync-12345").and_return(true)
|
expect(FileUtils).to receive(:remove_entry_secure).with("/tmp/vagrant-rsync-12345", true).and_return(true)
|
||||||
subject.rsync_single(machine, ssh_info, opts)
|
subject.rsync_single(machine, ssh_info, opts)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -305,7 +305,7 @@ describe VagrantPlugins::SyncedFolderRSync::RsyncHelper do
|
||||||
expect(args).not_to include("ControlPath=/tmp/vagrant-rsync-12345")
|
expect(args).not_to include("ControlPath=/tmp/vagrant-rsync-12345")
|
||||||
}.and_return(result)
|
}.and_return(result)
|
||||||
|
|
||||||
expect(FileUtils).not_to receive(:remove_entry_secure).with("/tmp/vagrant-rsync-12345")
|
expect(FileUtils).not_to receive(:remove_entry_secure).with("/tmp/vagrant-rsync-12345", true)
|
||||||
subject.rsync_single(machine, ssh_info, opts)
|
subject.rsync_single(machine, ssh_info, opts)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue