BLI: make BLI_make_existing_file() return true on success, and false on failure...
This commit is contained in:
parent
c89ed72048
commit
819064154c
|
@ -44,7 +44,7 @@ void BLI_setenv_if_new(const char *env, const char *val) ATTR_NONNULL(1);
|
|||
|
||||
void BLI_make_file_string(const char *relabase, char *string, const char *dir, const char *file);
|
||||
void BLI_make_exist(char *dir);
|
||||
void BLI_make_existing_file(const char *name);
|
||||
bool BLI_make_existing_file(const char *name);
|
||||
void BLI_split_dirfile(const char *string, char *dir, char *file, const size_t dirlen, const size_t filelen);
|
||||
void BLI_split_dir_part(const char *string, char *dir, const size_t dirlen);
|
||||
void BLI_split_file_part(const char *string, char *file, const size_t filelen);
|
||||
|
|
|
@ -1234,14 +1234,16 @@ void BLI_make_exist(char *dir)
|
|||
|
||||
/**
|
||||
* Ensures that the parent directory of *name exists.
|
||||
*
|
||||
* \return true on success (i.e. given path now exists on FS), false otherwise.
|
||||
*/
|
||||
void BLI_make_existing_file(const char *name)
|
||||
bool BLI_make_existing_file(const char *name)
|
||||
{
|
||||
char di[FILE_MAX];
|
||||
BLI_split_dir_part(name, di, sizeof(di));
|
||||
|
||||
/* make if the dir doesn't exist */
|
||||
BLI_dir_create_recursive(di);
|
||||
return BLI_dir_create_recursive(di);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue