mirror of
https://github.com/game-stop/veejay.git
synced 2025-12-20 14:50:01 +01:00
umask for open() call
git-svn-id: svn://code.dyne.org/veejay/trunk@1344 eb8d1916-c9e9-0310-b8de-cf0c9472ead5
This commit is contained in:
@@ -6359,7 +6359,7 @@ static void theme_response( gchar *string )
|
||||
char theme_config[1024];
|
||||
snprintf(theme_config,sizeof(theme_config), "%stheme.config", theme_dir );
|
||||
snprintf(theme_file,sizeof(theme_file), "%s/%s/gveejay.rc", theme_dir, string );
|
||||
int fd = open( theme_config , O_WRONLY | O_CREAT | O_TRUNC);
|
||||
int fd = open( theme_config , O_WRONLY | O_CREAT | O_TRUNC, S_IRWXU);
|
||||
if(fd > 0)
|
||||
{
|
||||
write( fd, string, strlen(string));
|
||||
|
||||
@@ -227,7 +227,7 @@ void vj_midi_save(void *vv, const char *filename)
|
||||
vmidi_t *v = (vmidi_t*) vv;
|
||||
if(!v->active) return;
|
||||
|
||||
int fd = open( filename, O_TRUNC|O_CREAT|O_WRONLY );
|
||||
int fd = open( filename, O_TRUNC|O_CREAT|O_WRONLY,S_IRWXU );
|
||||
if(!fd)
|
||||
{
|
||||
vj_msg(VEEJAY_MSG_ERROR, "Unable to save MIDI settings to %s",filename);
|
||||
@@ -253,8 +253,8 @@ void vj_midi_save(void *vv, const char *filename)
|
||||
d->extra,
|
||||
(d->widget == NULL ? "none" : d->widget ),
|
||||
d->msg );
|
||||
write( fd, tmp, strlen( tmp ));
|
||||
count ++;
|
||||
if( write( fd, tmp, strlen( tmp )) >= 0 )
|
||||
count ++;
|
||||
}
|
||||
free(items[i]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user