Solved the problem. It seems this function covers all scenarios:
private string FormatPath(SpriterFile file, string spriterName)
{
return String.Format("{0}/{1}", spriterName, file.Name);
}
If you trace the old code, you will see it stripping the folder names from the file name ...and then adding it back on with the folder variable...it works on the example because it changes "folder/file" down to "file" and concatenates "folder/" with "file"
It broke my program because "folder/subfolder/file" is broken down into "file" and concatenates "folder/" with "file"
If you just stick with the file name that already knows the folder, you don't need to do any of this or even send the folder variable into the function.
<spriter_data scml_version="1.0" generator="BrashMonkey Spriter" generator_version="r5" pixel_mode="1">
<folder id="0" name="male">
<file id="0" name="male/head/head_front.png" width="68" height="72" pivot_x="0.5" pivot_y="0.5"/>
<file id="1" name="male/hair_front/hair_base_0.png" width="128" height="116" pivot_x="0.5" pivot_y="0.5"/>
<file id="2" name="male/torso/chest_front_0.png" width="52" height="64" pivot_x="0.5" pivot_y="0.5"/>
<file id="3" name="male/torso/pelvis_front_0.png" width="52" height="28" pivot_x="0.5" pivot_y="0.5"/>
<file id="4" name="male/left_leg/leg_front_0.png" width="32" height="40" pivot_x="0.5" pivot_y="0.5"/>
<file id="5" name="male/left_leg/leg_front_1.png" width="32" height="40" pivot_x="0.5" pivot_y="0.5"/>