mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Merge pull request #1841 from turingmachine/patch-1
quote data in regex
This commit is contained in:
commit
c716044ed3
1 changed files with 1 additions and 1 deletions
|
@ -31,7 +31,7 @@ module Fog
|
||||||
dc_root_folder = dc.vmFolder
|
dc_root_folder = dc.vmFolder
|
||||||
# Filter the root path for this datacenter not to be used."
|
# Filter the root path for this datacenter not to be used."
|
||||||
dc_root_folder_path=dc_root_folder.path.map { | id, name | name }.join("/")
|
dc_root_folder_path=dc_root_folder.path.map { | id, name | name }.join("/")
|
||||||
paths = path.sub(/^\/?#{dc_root_folder_path}\/?/, '').split('/')
|
paths = path.sub(/^\/?#{Regex.quote(dc_root_folder_path)}\/?/, '').split('/')
|
||||||
|
|
||||||
return dc_root_folder if paths.empty?
|
return dc_root_folder if paths.empty?
|
||||||
# Walk the tree resetting the folder pointer as we go
|
# Walk the tree resetting the folder pointer as we go
|
||||||
|
|
Loading…
Reference in a new issue