lib/sapos/print/cli.rb in sapos-print-1.0.0 vs lib/sapos/print/cli.rb in sapos-print-1.0.1
- old
+ new
@@ -30,9 +30,14 @@
def start
info
config = Sapos::Print.config
puts ["Q=#{config.q.to_s}", "Printer=#{config.printer.to_s}", "Adapter=#{config.adapter.to_s}", "Interface=#{config.interface}"].join("\n")
+ print_dir = File.join(Sapos::Print.app_directory, 'print')
+ if File.exists?(print_dir)
+ FileUtils.rm_rf Dir.glob("#{print_dir}/*")
+ end
+
Sapos::Print::QReader.printer_config = config
Sapos::Print::QReader.verbose = options[:verbose]
Sapos::Print::QReader.run!
end
\ No newline at end of file