[TEE]
authorJohannes Anderwald <johannes.anderwald@reactos.org>
Sat, 2 Apr 2011 15:15:08 +0000 (15:15 +0000)
committerJohannes Anderwald <johannes.anderwald@reactos.org>
Sat, 2 Apr 2011 15:15:08 +0000 (15:15 +0000)
- TEE should overwrite existing file
- Patch by vins8920 hotmail
See issue #6022 for more details.

svn path=/trunk/; revision=51226

rosapps/applications/cmdutils/tee/tee.c

index 0d244fa..149f848 100644 (file)
@@ -154,7 +154,7 @@ INT main (int argc,char **p)
                //l=0;
                hFile[i] = CreateFile(files[i],GENERIC_WRITE,
                        0,NULL,
-                       OPEN_ALWAYS,
+                       CREATE_ALWAYS,
                        FILE_ATTRIBUTE_NORMAL,NULL);
 
                if (hFile[i] == INVALID_HANDLE_VALUE)