}
#endif
-static INT
-ConvertULargeInteger (ULARGE_INTEGER num, LPTSTR des, INT len, BOOL bPutSeperator)
-{
- TCHAR temp[32];
- INT c = 0;
- INT n = 0;
-
- if (num.QuadPart == 0)
- {
- des[0] = _T('0');
- des[1] = _T('\0');
- n = 1;
- }
- else
- {
- temp[31] = 0;
- while (num.QuadPart > 0)
- {
- if ((((c + 1) % (nNumberGroups + 1)) == 0) && (bPutSeperator))
- temp[30 - c++] = cThousandSeparator;
- temp[30 - c++] = (TCHAR)(num.QuadPart % 10) + _T('0');
- num.QuadPart /= 10;
- }
-
- for (n = 0; n <= c; n++)
- des[n] = temp[31 - c + n];
- }
-
- return n;
-}
-
-
static VOID
DirPrintFileDateTime(TCHAR *lpDate,
TCHAR *lpTime,
return 1;
}
+
/* In bare format we don't print results */
if (lpFlags->bBareFormat)
return 0;
/* 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);
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);
+ }
+
+ }
+ else
+ {
+
/* Print File Summary */
/* Condition to print summary is:
If we are not in bare format and if we have results! */
ConOutPrintf(szMsg,ulFiles, szBuffer);
}
-
+
+}
/* Print total directories and freespace */
szRoot[0] = szPath[0];
GetUserDiskFreeSpace(szRoot, &uliFree);
TCHAR szPath[MAX_PATH];
TCHAR szFilespec[MAX_PATH];
LPTSTR* params;
- UINT entries = 0;
+ INT entries = 0;
INT nLine = 0;
UINT loop = 0;
DIRSWITCHFLAGS stFlags;
}
/* read the parameters */
- if (!DirReadParam(rest, ¶ms, &entries, &stFlags))
+ if (!DirReadParam(rest, ¶ms, &entries, &stFlags) || CheckCtrlBreak(BREAK_INPUT))
{
nErrorLevel = 1;
return 1;
for(loop = 0; loop < entries; loop++)
{
/* parse the directory info */
- if (DirParsePathspec (params[loop], szPath, szFilespec))
+ if (DirParsePathspec (params[loop], szPath, szFilespec) || CheckCtrlBreak(BREAK_INPUT))
{
nErrorLevel = 1;
return 1;