lib/reaver/walk.rb in reaver-0.12.0 vs lib/reaver/walk.rb in reaver-0.13.0

- old
+ new

@@ -24,10 +24,12 @@ extract_zip when %r{^application/(gzip|x-xz)} extract_gzip when %r{^font/ttf} copy_file + when %r{^application/(x-elf|x-sh)} + copy_file_with_x else puts "Filetype #{@extension} not yet supported, skipping..." end end @@ -50,9 +52,16 @@ def copy_file puts "Copying file #{@filename} at #{@final_dest}..." FileUtils.mkdir_p @final_dest FileUtils.cp @filename, "#{@final_dest}/#{@filename}" + rescue Errno::ETXTBSY => e + puts "You should stop program before update > #{e}" + end + + def copy_file_with_x + copy_file + File.chmod 0700, "#{@final_dest}/#{@filename}" end def extract_zip puts "Extracting zip archive #{@filename} at #{@final_dest}..." FileUtils.mkdir_p @final_dest