- File.unlink(*Dir.glob(File.join(GPX_TRACE_DIR, "*.gpx")))
- File.unlink(*Dir.glob(File.join(GPX_IMAGE_DIR, "*.gif")))
-
- Object.send("remove_const", "GPX_TRACE_DIR")
- Object.const_set("GPX_TRACE_DIR", @gpx_trace_dir)
-
- Object.send("remove_const", "GPX_IMAGE_DIR")
- Object.const_set("GPX_IMAGE_DIR", @gpx_image_dir)
+ FileUtils.remove_dir(Settings.gpx_trace_dir)
+ FileUtils.remove_dir(Settings.gpx_image_dir)
+ Settings.gpx_trace_dir = @gpx_trace_dir_orig
+ Settings.gpx_image_dir = @gpx_image_dir_orig