Skip to content

Commit af33170

Browse files
committed
support paths with special characters
1 parent 25dab88 commit af33170

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

providers/default.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
client = S3FileLib::client
99
download = true
1010

11-
# handle key specified without leading slash
12-
remote_path = ::File.join('', new_resource.remote_path)
11+
# handle key specified without leading slash, and support URL encoding when necessary.
12+
remote_path = ::File.join('', new_resource.remote_path).split('/').map{|x| CGI.escape(x)}.join('/')
1313

1414
# we need credentials to be mutable
1515
aws_access_key_id = new_resource.aws_access_key_id

0 commit comments

Comments
 (0)