In upstream pySim, pe2files() only ever changes the directory upon encountering an explicit filePath. According to TCA SAIP Section 8 / ETSI TS 102 221, when createFCP creates a DF/ADF, that directory becomes the currently selected DF/ADF, and subsequent files created belong inside it until another filePath appears. Without tracking this, files created immediately after a DF end up directly under MF (0x3F00) instead of inside the DF.
I verified that tracking the descent when file.file_type in ['DF', 'ADF'] fixes the hierarchy for child EFs and added logic inside perform() to track the descent when file.file_type in [‘DF’, ‘ADF’]
if file.file_type in [‘DF’, ‘ADF’] and file.fid is not None:
path.append(file.fid)
Once added, the profile hierarchy is properly preserved and profile download succeeds. Please suggest the correct path. Please note that I already riased a Bug but still neeed to discuss on this forum for better approches.