code/superant.com.schedule/deleterwdscheduleupdatefiles.rb in rwdschedule-0.92 vs code/superant.com.schedule/deleterwdscheduleupdatefiles.rb in rwdschedule-0.93
- old
+ new
@@ -1,20 +1,20 @@
-# this code is to delete update files
-def deleterwdscheduleupdatefiles
- # exception begin
- begin
+# this code is to delete update files
+def deleterwdscheduleupdatefiles
+ # exception begin
+ begin
fileListarray = Dir.new($rwdschedule_updatedirectory).entries.sort.delete_if { |x| ! (x =~ /sch$/) }
- #loop through and get the files names
-
- fileListarray.each do |x|
- filetodelete = File.join($rwdschedule_updatedirectory,x)
- if File.exist?(filetodelete)
- File.delete(filetodelete)
- end
- end
- @rwdscheduleftpdisplay = "update files deleted"
- rescue
- @rwdscheduleftpdisplay = "error opening schedule update directory"
- end # end of error function
- end
-
-
+ #loop through and get the files names
+
+ fileListarray.each do |x|
+ filetodelete = File.join($rwdschedule_updatedirectory,x)
+ if File.exist?(filetodelete)
+ File.delete(filetodelete)
+ end
+ end
+ @rwdscheduleftpdisplay = "update files deleted"
+ rescue
+ @rwdscheduleftpdisplay = "error opening schedule update directory"
+ end # end of error function
+ end
+
+