calculate depth against top, not against root (current dir)