[CMD]: Continue refactoring to lay out the way to using the CONUTILS library in CMD...
[reactos.git] / reactos / base / shell / cmd / type.c
index 78ccc5b..2c8955d 100644 (file)
@@ -82,7 +82,7 @@ INT cmd_type(LPTSTR param)
 
         hFile = CreateFile(argv[i],
                            GENERIC_READ,
-                           FILE_SHARE_READ, NULL,
+                           FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
                            OPEN_EXISTING,
                            FILE_ATTRIBUTE_NORMAL, NULL);
 
@@ -107,7 +107,7 @@ INT cmd_type(LPTSTR param)
         {
             while (FileGetString(hFile, buff, ARRAYSIZE(buff)))
             {
-                if (ConOutPrintfPaging(bFirstTime, _T("%s"), buff) == 1)
+                if (!ConOutPrintfPaging(bFirstTime, _T("%s"), buff))
                 {
                     bCtrlBreak = FALSE;
                     CloseHandle(hFile);