snprintf(full_path, 1024, "%s/%s", dir, file);
fp = fopen(full_path, mode);
}
-
+
if (fp)
{
fclose(fp);
return NULL;
}
-
FILE *open_file_from_path (char *file, char *mode)
{
if (mode[0]!='r')
} else
{
char *full_path=find_file(file);
+ if (full_path==NULL)
+ return NULL;
FILE *fp = NULL;
fp = fopen(full_path, mode);
free(full_path);