Fix 2.4.2 upgrade notes formatting refs #19330
[arvados.git] / apps / workbench / test / helpers / download_helper.rb
index 8f387f419bf50a7bc5acba39b8a4fef1a36db368..c8b5712bb11fd28752f583503eefc8319a536a56 100644 (file)
@@ -1,3 +1,7 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
 module DownloadHelper
   module_function
 
@@ -6,7 +10,9 @@ module DownloadHelper
   end
 
   def clear
-    FileUtils.rm_r path
+    if File.exist? path
+      FileUtils.rm_r path
+    end
     begin
       Dir.mkdir path
     rescue Errno::EEXIST