code/xb1rwdtinkerbackwindow/listzips.rb in rwdtinker-1.42 vs code/xb1rwdtinkerbackwindow/listzips.rb in rwdtinker-1.43

- old
+ new

@@ -1,8 +1,10 @@ # this code is to list the zipped applets that can be installed -def listzipfilestoinstall - fileList = Dir.new("zips").entries.sort.reverse.delete_if { |x| ! (x =~ /zip$/) } - @zipslistresult = fileList.rwd_method("fillziptoinstallname") +def listzipfilestoinstall + if File.exist?($zipslocation) + fileList = Dir.new($zipslocation).entries.sort.delete_if { |x| ! (x =~ /zip$/) } + @zipslistresult = fileList.rwd_method("fillziptoinstallname") + end end def fillziptoinstallname(inffile) applet = inffile.gsub(/\.zip$/, "") @a_installapplet = applet