The following test code produces unexpected results in some circumstances.
function OnClick(clickData)
{
var srcpath = clickData.func.sourcetab.path;
DOpus.output("Path = "+String(srcpath));
DOpus.output("Path Part = "+srcpath.pathpart);
DOpus.output("File Part = "+srcpath.filepart);
}
If the source tab is C:\test then output is as expected.
Path = C:\test Path Part = C:\ File Part = test
If the source tab is C:\ then output is not as expected (by me).
Path = C:\ Path Part = C:\ File Part = C:\
If the source tab is coll://Find Results then output is as expected.
Path = coll://Find Results Path Part = coll:// File Part = Find Results
If the source tab is coll:// then output is not as expected.
Yes, Path.test_root is certainly a fail safe up front test, but returning an empty string for Path.filepart would be more intuitive and consistent, in my opinion, than returning C:\ for a drive root or \ for a coll:\\ root.