Moving and copying must succeed.

This commit is contained in:
Markus Reiter 2018-06-01 03:31:12 +02:00
parent 43bb5d28d7
commit e07e036695

View File

@ -43,7 +43,7 @@ module Hbc
if target.parent.writable? if target.parent.writable?
FileUtils.move(source, target) FileUtils.move(source, target)
else else
command.run("/bin/mv", args: [source, target], sudo: true) command.run!("/bin/mv", args: [source, target], sudo: true)
end end
add_altname_metadata(target, source.basename, command: command) add_altname_metadata(target, source.basename, command: command)
@ -68,7 +68,7 @@ module Hbc
if target.parent.writable? if target.parent.writable?
FileUtils.cp_r(target, source) FileUtils.cp_r(target, source)
else else
command.run("/bin/cp", args: ["-r", target, source], sudo: true) command.run!("/bin/cp", args: ["-r", target, source], sudo: true)
end end
delete(target, force: force, command: command, **options) delete(target, force: force, command: command, **options)