Add comment for the logic. e.g. "if the folder has exactly one subfolder and has no files, use the subfolder for the base of the job (applying this logic recursively)."