made POSIX compliant
This commit is contained in:
@@ -65,7 +65,8 @@ static char* build_column_directory_name(const char* column_name)
|
||||
char* column_directory_name;
|
||||
|
||||
// Build the database directory name
|
||||
if (asprintf(&column_directory_name, "%s.obicol", column_name) < 0)
|
||||
column_directory_name = (char*) malloc((strlen(column_name) + 8)*sizeof(char));
|
||||
if (sprintf(column_directory_name, "%s.obicol", column_name) < 0)
|
||||
{
|
||||
obi_set_errno(OBICOLDIR_MEMORY_ERROR);
|
||||
obidebug(1, "\nError building a column directory name");
|
||||
@@ -104,7 +105,7 @@ int obi_column_directory_exists(OBIDMS_p dms, const char* column_name)
|
||||
return -1;
|
||||
|
||||
// Get the full path for the column directory
|
||||
full_path = get_full_path(dms->dir_fd, column_directory_name);
|
||||
full_path = get_full_path(dms, column_directory_name);
|
||||
if (full_path == NULL)
|
||||
{
|
||||
obi_set_errno(OBICOLDIR_UNKNOWN_ERROR);
|
||||
@@ -169,7 +170,7 @@ OBIDMS_column_directory_p obi_open_column_directory(OBIDMS_p dms, const char* co
|
||||
return NULL;
|
||||
|
||||
// Try to open the column directory
|
||||
directory = private_opendirat(dms->dir_fd, column_directory_name);
|
||||
directory = opendir_in_dms(dms, column_directory_name);
|
||||
if (directory == NULL) {
|
||||
switch (errno)
|
||||
{
|
||||
|
Reference in New Issue
Block a user