if (!result) {
if (errno) {
PERROR("Failed to enumerate the contents of path \"%s\" while loading session, readdir returned", path);
if (!result) {
if (errno) {
PERROR("Failed to enumerate the contents of path \"%s\" while loading session, readdir returned", path);