diff --git a/veejay-current/veejay-client/src/vj-api.c b/veejay-current/veejay-client/src/vj-api.c index 2c78aad3..8515585f 100644 --- a/veejay-current/veejay-client/src/vj-api.c +++ b/veejay-current/veejay-client/src/vj-api.c @@ -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)); diff --git a/veejay-current/veejay-client/src/vj-midi.c b/veejay-current/veejay-client/src/vj-midi.c index a515640e..4389a491 100644 --- a/veejay-current/veejay-client/src/vj-midi.c +++ b/veejay-current/veejay-client/src/vj-midi.c @@ -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]); }