mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
first path check missing forward slash between dcpath and datacenter (#31481)
* fixed folder path logic * fixed folder path logic * fixed folder path logic
This commit is contained in:
parent
2b63ae61f2
commit
ada6159ece
1 changed files with 2 additions and 1 deletions
|
@ -1110,7 +1110,8 @@ class PyVmomiHelper(PyVmomi):
|
||||||
dcpath = compile_folder_path_for_object(datacenter)
|
dcpath = compile_folder_path_for_object(datacenter)
|
||||||
|
|
||||||
# Check for full path first in case it was already supplied
|
# Check for full path first in case it was already supplied
|
||||||
if (self.params['folder'].startswith(dcpath + self.params['datacenter'] + '/vm')):
|
if (self.params['folder'].startswith(dcpath + self.params['datacenter'] + '/vm') or
|
||||||
|
self.params['folder'].startswith(dcpath + '/' + self.params['datacenter'] + '/vm')):
|
||||||
fullpath = self.params['folder']
|
fullpath = self.params['folder']
|
||||||
elif (self.params['folder'].startswith('/vm/') or self.params['folder'] == '/vm'):
|
elif (self.params['folder'].startswith('/vm/') or self.params['folder'] == '/vm'):
|
||||||
fullpath = "%s%s%s" % (dcpath, self.params['datacenter'], self.params['folder'])
|
fullpath = "%s%s%s" % (dcpath, self.params['datacenter'], self.params['folder'])
|
||||||
|
|
Loading…
Reference in a new issue