From looking at the code below I cannot seem to find the case where a directory is handled.