lib/vagrant-iijgp/action/sync_folders.rb
# Prepares the synced folders by verifying they exist and creating them
# if they don't.
Prepares the synced folders by verifying they exist and creating them
if they don't.
Prepares the synced folders by verifying they exist and creating them if they don ' t .
def prepare_folders
          synced_folders.each do |id, options|
            hostpath = Pathname.new(options[:hostpath]).expand_path(@env[:root_path])
            if !hostpath.directory? && options[:create]
              @logger.debug("Host path doesn't exist, creating: #{hostpath}")
              begin
                hostpath.mkpath
              rescue Errno::EACCES
                raise Vagrant::Errors::SharedFolderCreateFailed,
                  :path => hostpath.to_s
              end
            end
          end
        end
def prepare_folders synced_folders . each do | id , options | hostpath = Pathname . new ( options [ :hostpath ] ) . expand_path ( @env [ :root_path ] ) if ! hostpath . directory? && options [ :create ] @logger . debug ( "Host path doesn't exist, creating: #{hostpath}" ) begin hostpath . mkpath rescue Errno :: EACCES raise Vagrant :: Errors :: SharedFolderCreateFailed , :path => hostpath . to_s end end end end
Prepares the synced folders by verifying they exist and creating them
if they don't.
Prepares the synced folders by verifying they exist and creating them if they don ' t .
# Host path doesn't exist, so let's create it.