create recovery directory in .veejay if it doesnt exist

git-svn-id: svn://code.dyne.org/veejay/trunk@1046 eb8d1916-c9e9-0310-b8de-cf0c9472ead5
This commit is contained in:
Niels Elburg
2007-12-09 00:08:03 +00:00
parent a865cd9dc5
commit f3f688af8e

View File

@@ -1309,35 +1309,11 @@ void veejay_check_homedir(void *arg)
{
veejay_msg(VEEJAY_MSG_WARNING, "No veejay config file in %s", path );
ret = mkdir(path,0777);
if( ret != 0 )
{
error = 1;
}
else
{
snprintf(path,1024, "%s/.veejay/recovery", home );
mkdir(path,0777);
snprintf(path,1024, "%s/.veejay/theme", home );
mkdir(path,0777);
}
if(error)
switch(errno)
{
case 0:
break;
case EACCES:
veejay_msg( VEEJAY_MSG_ERROR, "\tPermission denied");break;
case EEXIST:
veejay_msg( VEEJAY_MSG_ERROR, "\tPath already exists and may not be a directory");break;
case ELOOP:
veejay_msg( VEEJAY_MSG_ERROR, "\tToo many symbolic links"); break;
case ENOSPC:
veejay_msg( VEEJAY_MSG_ERROR, "\tOut of available diskpace. Delete some files and try again"); break;
default:
veejay_msg( VEEJAY_MSG_ERROR, "\tSome other error occured");
break;
}
}
stat( path, &s );
if(!error)