C: optimized dir opening

This commit is contained in:
Celine Mercier
2019-08-29 16:35:10 +02:00
parent 187053026f
commit e43e49d6f1
4 changed files with 13 additions and 16 deletions

View File

@ -764,6 +764,13 @@ OBIDMS_p obi_create_dms(const char* dms_path)
return NULL;
}
if (closedir(dms_dir) < 0)
{
obi_set_errno(OBIDMS_UNKNOWN_ERROR);
obidebug(1, "\nError closing a directory");
return NULL;
}
return dms;
}