mirror of
https://github.com/game-stop/veejay.git
synced 2025-12-22 15:50:01 +01:00
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:
@@ -1309,34 +1309,10 @@ void veejay_check_homedir(void *arg)
|
|||||||
{
|
{
|
||||||
veejay_msg(VEEJAY_MSG_WARNING, "No veejay config file in %s", path );
|
veejay_msg(VEEJAY_MSG_WARNING, "No veejay config file in %s", path );
|
||||||
ret = mkdir(path,0777);
|
ret = mkdir(path,0777);
|
||||||
if( ret != 0 )
|
snprintf(path,1024, "%s/.veejay/recovery", home );
|
||||||
{
|
mkdir(path,0777);
|
||||||
error = 1;
|
snprintf(path,1024, "%s/.veejay/theme", home );
|
||||||
}
|
mkdir(path,0777);
|
||||||
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 );
|
stat( path, &s );
|
||||||
|
|||||||
Reference in New Issue
Block a user