diff --git a/lib/vagrant/actions/vm/shared_folders.rb b/lib/vagrant/actions/vm/shared_folders.rb index e6bcd1e7d..994d9dfc1 100644 --- a/lib/vagrant/actions/vm/shared_folders.rb +++ b/lib/vagrant/actions/vm/shared_folders.rb @@ -33,7 +33,8 @@ module Vagrant def clear_shared_folders logger.info "Clearing previously set shared folders..." - @runner.vm.shared_folders.each do |shared_folder| + folders = @runner.vm.shared_folders.dup + folders.each do |shared_folder| shared_folder.destroy end