mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
don't create read-only files
svn path=/trunk/; revision=10206
This commit is contained in:
parent
06dd253e6e
commit
430efd137f
1 changed files with 2 additions and 2 deletions
|
@ -60,10 +60,10 @@ int main(int argc, char* argv[])
|
||||||
}
|
}
|
||||||
|
|
||||||
path = convert_path(argv[1]);
|
path = convert_path(argv[1]);
|
||||||
id = open(path, S_IWRITE);
|
id = open(path, S_IWRITE, S_IRUSR | S_IWUSR);
|
||||||
if (id < 0)
|
if (id < 0)
|
||||||
{
|
{
|
||||||
id = open(path, S_IWRITE | O_CREAT);
|
id = open(path, O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR);
|
||||||
if (id < 0)
|
if (id < 0)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "Cannot create file.\n");
|
fprintf(stderr, "Cannot create file.\n");
|
||||||
|
|
Loading…
Reference in a new issue