X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/209d83a0ce0bd22669a39f49daddca432babeae7..caee2ad84cf7a8e7349fc08d0de30e50a93adf13:/apps/workbench/test/helpers/download_helper.rb diff --git a/apps/workbench/test/helpers/download_helper.rb b/apps/workbench/test/helpers/download_helper.rb index 8f387f419b..c8b5712bb1 100644 --- a/apps/workbench/test/helpers/download_helper.rb +++ b/apps/workbench/test/helpers/download_helper.rb @@ -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