Bug: system.tag.browseHistoricalTags() returns wrong historian tag path

OS: Microsoft Windows [version 10.0.18363.1379]
database: postgres 12
ignition: 8.0.16 (b2020082513) Maker’s edition

historian_tag_provider='psql12'
gateway_system_name='Ignition-LAPTOP-OJEBD5CJ'
realtime_tag_provider='default'
tag_folder='' # an example
hist_path = 'histprov:%s:/drv:%s:%s:/tag:%s'%(historian_tag_provider,gateway_system_name,realtime_tag_provider,tag_folder)


def browse(path):
	print 'path=%s'%path
	ret = system.tag.browseHistoricalTags(path)
	if ret.getResults() is not None:
		for result in ret.getResults():
			print result.getPath()
			if result.hasChildren():
				browse(result.getPath())
browse(hist_path)

output:

path=histprov:psql12:/drv:Ignition-LAPTOP-OJEBD5CJ:default:/tag:
histprov:psql12:/drv:Ignition-LAPTOP-OJEBD5CJ:default:/tag:/motor_venturi
path=histprov:psql12:/drv:Ignition-LAPTOP-OJEBD5CJ:default:/tag:/motor_venturi
histprov:psql12:/drv:Ignition-LAPTOP-OJEBD5CJ:default:/tag:/tc1
histprov:psql12:/drv:Ignition-LAPTOP-OJEBD5CJ:default:/tag:/dam4702_t_wall
path=histprov:psql12:/drv:Ignition-LAPTOP-OJEBD5CJ:default:/tag:/dam4702_t_wall
histprov:psql12:/drv:Ignition-LAPTOP-OJEBD5CJ:default:/tag:/dam4602_ai
path=histprov:psql12:/drv:Ignition-LAPTOP-OJEBD5CJ:default:/tag:/dam4602_ai
histprov:psql12:/drv:Ignition-LAPTOP-OJEBD5CJ:default:/tag:/ybd608_dio
path=histprov:psql12:/drv:Ignition-LAPTOP-OJEBD5CJ:default:/tag:/ybd608_dio
histprov:psql12:/drv:Ignition-LAPTOP-OJEBD5CJ:default:/tag:/motor_valve
path=histprov:psql12:/drv:Ignition-LAPTOP-OJEBD5CJ:default:/tag:/motor_valve
histprov:psql12:/drv:Ignition-LAPTOP-OJEBD5CJ:default:/tag:/dam4702_t_system
path=histprov:psql12:/drv:Ignition-LAPTOP-OJEBD5CJ:default:/tag:/dam4702_t_system
histprov:psql12:/drv:Ignition-LAPTOP-OJEBD5CJ:default:/tag:/motor_pot
path=histprov:psql12:/drv:Ignition-LAPTOP-OJEBD5CJ:default:/tag:/motor_pot

The error point is at the slash / just after tag:
path=histprov:psql12:/drv:Ignition-LAPTOP-OJEBD5CJ:default:/tag:/motor_pot is wrong,
path=histprov:psql12:/drv:Ignition-LAPTOP-OJEBD5CJ:default:/tag:motor_pot is correct.

a quick but imperfect fix:


import re
def browse(path):
	#print 'path=%s'%path
	ret = system.tag.browseHistoricalTags(path)
	if ret.getResults() is not None:
		for result in ret.getResults():
			res_path = str(result.getPath())
			res_path = re.sub('tag:/','tag:',res_path)
			if result.hasChildren():
				browse(res_path)
			else:
				print res_path
browse(hist_path)