When saving project, create project directory if it doesn't exist

This commit is contained in:
Nedko Arnaudov 2010-08-31 04:00:48 +03:00
parent f67b4e75ec
commit b251c7afed
1 changed files with 6 additions and 0 deletions

View File

@ -33,6 +33,7 @@
#include "room_internal.h"
#include "../catdup.h"
#include "save.h"
#include "dirhelpers.h"
#define PROJECT_HEADER_TEXT BASE_NAME " Project.\n"
@ -54,6 +55,11 @@ static bool ladish_room_save_project_do(struct ladish_room * room_ptr)
ret = false;
if (!ensure_dir_exist(room_ptr->project_dir, 0777))
{
goto exit;
}
uuid_generate(room_ptr->project_uuid); /* TODO: the uuid should be changed on "save as" but not on "rename" */
uuid_unparse(room_ptr->project_uuid, uuid_str);