mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-11-21 22:31:19 +00:00
Create files according to the process umask.
This commit is contained in:
parent
2666bef882
commit
e933e7885f
@ -581,7 +581,7 @@ static void create_volume_ok(GtkWidget *button, file_req_assoc *assoc)
|
||||
delete assoc;
|
||||
return;
|
||||
}
|
||||
int fd = open(file, O_CREAT | O_WRONLY | O_EXCL, S_IRUSR | S_IWUSR);
|
||||
int fd = open(file, O_CREAT | O_WRONLY | O_EXCL, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
|
||||
if (fd < 0 && errno == EEXIST) {
|
||||
printf("File already exists, refusing to overwrite file.\n");
|
||||
} else {
|
||||
|
@ -510,7 +510,7 @@ static void create_volume_ok(GtkWidget *button, file_req_assoc *assoc)
|
||||
delete assoc;
|
||||
return;
|
||||
}
|
||||
int fd = open(file, O_CREAT | O_WRONLY | O_EXCL, S_IRUSR | S_IWUSR);
|
||||
int fd = open(file, O_CREAT | O_WRONLY | O_EXCL, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
|
||||
if (fd < 0 && errno == EEXIST) {
|
||||
printf("File already exists, refusing to overwrite file.\n");
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user