Stop the footer from printing twice. fixes 1084.
authorBrandon Turner <turnerb7@msu.edu>
Sun, 11 Dec 2005 05:34:11 +0000 (05:34 +0000)
committerBrandon Turner <turnerb7@msu.edu>
Sun, 11 Dec 2005 05:34:11 +0000 (05:34 +0000)
svn path=/trunk/; revision=20050

reactos/subsys/system/cmd/dir.c

index 7239811..e8b0d76 100644 (file)
@@ -1138,46 +1138,33 @@ PrintSummary(LPTSTR szPath,
        /* Print recursive specific results */
        
     /* Take this code offline to fix /S does not print duoble info */
-       if (lpFlags->bRecursive)
-       {
-               ConvertULargeInteger(u64Bytes, szBuffer, sizeof(szBuffer), lpFlags->bTSeperator);
-
-               LoadString(CMD_ModuleHandle, STRING_DIR_HELP5, szMsg, RC_STRING_MAX_SIZE);
-               if(lpFlags->bPause)
-                  ConOutPrintfPaging(FALSE,szMsg,ulFiles, szBuffer);
-               else
-                  ConOutPrintf(szMsg,ulFiles, szBuffer);
-                  
-                  if (ulFiles > 0)
-       {
-               ConvertULargeInteger(u64Bytes, szBuffer, 20, lpFlags->bTSeperator);
-               LoadString(CMD_ModuleHandle, STRING_DIR_HELP8, szMsg, RC_STRING_MAX_SIZE);
-               if(lpFlags->bPause)
-                  ConOutPrintfPaging(FALSE,szMsg,ulFiles, szBuffer);
-               else
-                  ConOutPrintf(szMsg,ulFiles, szBuffer);
+   if (lpFlags->bRecursive)
+   {
+      ConvertULargeInteger(u64Bytes, szBuffer, sizeof(szBuffer), lpFlags->bTSeperator);
+      LoadString(CMD_ModuleHandle, STRING_DIR_HELP5, szMsg, RC_STRING_MAX_SIZE);
+      if(lpFlags->bPause)
+         ConOutPrintfPaging(FALSE,szMsg,ulFiles, szBuffer);
+      else
+         ConOutPrintf(szMsg,ulFiles, szBuffer);
+   }
+   else
+   {
+
+      /* Print File Summary */
+      /* Condition to print summary is:
+      If we are not in bare format and if we have results! */
+      if (ulFiles > 0)
+      {
+         ConvertULargeInteger(u64Bytes, szBuffer, 20, lpFlags->bTSeperator);
+         LoadString(CMD_ModuleHandle, STRING_DIR_HELP8, szMsg, RC_STRING_MAX_SIZE);
+         if(lpFlags->bPause)
+            ConOutPrintfPaging(FALSE,szMsg,ulFiles, szBuffer);
+         else
+            ConOutPrintf(szMsg,ulFiles, szBuffer);
 
-       }
-       
-       }
-     else
-     {
-     
-       /* Print File Summary */
-       /* Condition to print summary is:
-          If we are not in bare format and if we have results! */
-       if (ulFiles > 0)
-       {
-               ConvertULargeInteger(u64Bytes, szBuffer, 20, lpFlags->bTSeperator);
-               LoadString(CMD_ModuleHandle, STRING_DIR_HELP8, szMsg, RC_STRING_MAX_SIZE);
-               if(lpFlags->bPause)
-                  ConOutPrintfPaging(FALSE,szMsg,ulFiles, szBuffer);
-               else
-                  ConOutPrintf(szMsg,ulFiles, szBuffer);
+      }
 
-       }
-       
-}
+   }
        /* Print total directories and freespace */
        szRoot[0] = szPath[0];
        GetUserDiskFreeSpace(szRoot, &uliFree);