mirror of
https://github.com/inspec/inspec
synced 2024-11-10 15:14:23 +00:00
Attempt at a bug fix to read backslashes as forward slashes in local fetcher
This commit is contained in:
parent
8825b71412
commit
fe5c7c49a4
2 changed files with 28 additions and 23 deletions
|
@ -15,6 +15,9 @@ module Fetchers
|
|||
# Support "urls" in the form of file://
|
||||
if target.start_with?('file://')
|
||||
target = target.gsub(%r{^file://}, '')
|
||||
else
|
||||
# support for windows paths
|
||||
target.tr!('\\', '/')
|
||||
end
|
||||
|
||||
if !File.exist?(target)
|
||||
|
|
|
@ -52,6 +52,8 @@ describe Inspec::Plugins::RelFetcher do
|
|||
# ignored by all tar streaming tools, its not extracted by GNU tar since 1.14
|
||||
%w{/pax_global_header /a/b} => %w{b},
|
||||
%w{pax_global_header a/b} => %w{b},
|
||||
# windows path
|
||||
%w{.\\path\\} => %w{./path/}
|
||||
}.each do |ins, outs|
|
||||
describe 'empty profile' do
|
||||
let(:in_files) { ins }
|
||||
|
|
Loading…
Reference in a new issue