diff options
| author | Josh Cooper <josh@puppetlabs.com> | 2011-07-26 14:57:33 -0700 |
|---|---|---|
| committer | Josh Cooper <josh@puppetlabs.com> | 2011-07-26 14:57:33 -0700 |
| commit | 770e30d620271f988321ea45c108fb167ab55ad7 (patch) | |
| tree | 48a4bcd382919164b3938e9a20de97cf6ab89a2b /lib | |
| parent | b13427b56d8529731d0334d420b24a592ecb43ea (diff) | |
| parent | 9279d0954eb20d75e18a666fd572b5492e157608 (diff) | |
| download | puppet-770e30d620271f988321ea45c108fb167ab55ad7.tar.gz puppet-770e30d620271f988321ea45c108fb167ab55ad7.tar.xz puppet-770e30d620271f988321ea45c108fb167ab55ad7.zip | |
Merge branch 'feature/master/8268-puppet-agent-windows'
* feature/master/8268-puppet-agent-windows:
Fix issue with forward and backslashes in Windows paths
Disable spec tests for unsupported functionality on Windows
Update certificate spec tests for Windows
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/puppet/node/environment.rb | 5 | ||||
| -rw-r--r-- | lib/puppet/util/rdoc/parser.rb | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/lib/puppet/node/environment.rb b/lib/puppet/node/environment.rb index f25bb65a9..4fc314a6a 100644 --- a/lib/puppet/node/environment.rb +++ b/lib/puppet/node/environment.rb @@ -131,9 +131,12 @@ class Puppet::Node::Environment def validate_dirs(dirs) dir_regex = Puppet.features.microsoft_windows? ? /^[A-Za-z]:#{File::SEPARATOR}/ : /^#{File::SEPARATOR}/ + # REMIND: Dir.getwd on windows returns a path containing backslashes, which when joined with + # dir containing forward slashes, breaks our regex matching. In general, path validation needs + # to be refactored which will be handled in a future commit. dirs.collect do |dir| if dir !~ dir_regex - File.join(Dir.getwd, dir) + File.expand_path(File.join(Dir.getwd, dir)) else dir end diff --git a/lib/puppet/util/rdoc/parser.rb b/lib/puppet/util/rdoc/parser.rb index 762ce25f0..a8996ee9a 100644 --- a/lib/puppet/util/rdoc/parser.rb +++ b/lib/puppet/util/rdoc/parser.rb @@ -113,7 +113,9 @@ class Parser Puppet::Module.modulepath.each do |mp| # check that fullpath is a descendant of mp dirname = fullpath - while (dirname = File.dirname(dirname)) != '/' + previous = dirname + while (dirname = File.dirname(previous)) != previous + previous = dirname return nil if File.identical?(dirname,mp) end end |
