X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/206451cdcaee133836761024c8517629de429f10..42c20b25e1325124b88e3b9b285544dc41122b56:/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 21fb4cd4cc..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_f path + if File.exist? path + FileUtils.rm_r path + end begin Dir.mkdir path rescue Errno::EEXIST