don't create read-only files

svn path=/trunk/; revision=10206
This commit is contained in:
Thomas Bluemel
2004-07-18 21:39:55 +00:00
parent 06dd253e6e
commit 430efd137f
+2 -2
View File
@@ -60,10 +60,10 @@ int main(int argc, char* argv[])
}
path = convert_path(argv[1]);
id = open(path, S_IWRITE);
id = open(path, S_IWRITE, S_IRUSR | S_IWUSR);
if (id < 0)
{
id = open(path, S_IWRITE | O_CREAT);
id = open(path, O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR);
if (id < 0)
{
fprintf(stderr, "Cannot create file.\n");