Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Commit

Permalink
Merge branch 'master' of github.com:mitchellh/vagrant-rackspace
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle Rames committed Aug 22, 2013
2 parents 72ac0a6 + 53f4e10 commit 5275f9a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/vagrant-rackspace/action/sync_folders.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require "log4r"

require 'rbconfig'
require "vagrant/util/subprocess"

module VagrantPlugins
Expand All @@ -11,6 +11,7 @@ class SyncFolders
def initialize(app, env)
@app = app
@logger = Log4r::Logger.new("vagrant_rackspace::action::sync_folders")
@host_os = RbConfig::CONFIG['host_os']
end

def call(env)
Expand All @@ -25,6 +26,11 @@ def call(env)
# Make sure there is a trailing slash on the host path to
# avoid creating an additional directory with rsync
hostpath = "#{hostpath}/" if hostpath !~ /\/$/

# If on Windows, modify the path to work with cygwin rsync
if @host_os =~ /mswin|mingw|cygwin/
hostpath = hostpath.sub(/^([A-Za-z]):\//, "/cygdrive/#{$1.downcase}/")
end

env[:ui].info(I18n.t("vagrant_rackspace.rsync_folder",
:hostpath => hostpath,
Expand Down

0 comments on commit 5275f9a

Please sign in to comment.