code/superant.com.rwdtinkerbackwindow/removeapplet.rb in rwdshell-0.98 vs code/superant.com.rwdtinkerbackwindow/removeapplet.rb in rwdshell-0.99
- old
+ new
@@ -1,32 +1,33 @@
- def removeapplet
- require 'fileutils'
- nametext = "%s" % [@a_removeapplet]
-
- begin # exception trapped block
- fileName = "installed/" + nametext + ".inf"
- count = 0
- fd = File.open(fileName,"r")
-
-
- fd.each { |oneline|
- if count == 1
- if File.exist?(oneline.chop)
- FileUtils.rm_rf( oneline.chop)
- end
-
- end
- count = 1
- }
- fd.close
-
- FileUtils.rm_rf( fileName)
-
-
- @removeapplettext = "applet files removed! - restart rwd to finish uninstalling"
-
- rescue
- @removeapplettext = "\n" + "error"
-
- end # exception rescue
+# method to remove a tinker applet
+def removeapplet
+ require 'fileutils'
+ nametext = "%s" % [@a_removeapplet]
- end
+ begin # exception trapped block
+ fileName = "installed/" + nametext + ".inf"
+ count = 0
+ fd = File.open(fileName,"r")
+
+
+ fd.each { |oneline|
+ if count == 1
+ if File.exist?(oneline.chop)
+ FileUtils.rm_rf( oneline.chop)
+ end
+
+ end
+ count = 1
+ }
+ fd.close
+
+ FileUtils.rm_rf( fileName)
+
+
+ @removeapplettext = "applet files removed! - restart rwd to finish uninstalling"
+
+ rescue
+ @removeapplettext = "\n" + "error"
+
+ end # exception rescue
+
+end