From befc1d3a5a78a464d91c1c96cbd0b2cfd8c1bcdc Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Mon, 4 Aug 2008 16:08:03 +0000 Subject: [PATCH] - Call ChkDsk function with NT pathname, not DOS pathname. svn path=/trunk/; revision=35105 --- reactos/base/system/autochk/autochk.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/reactos/base/system/autochk/autochk.c b/reactos/base/system/autochk/autochk.c index 8fa15d403df..b0de270e717 100644 --- a/reactos/base/system/autochk/autochk.c +++ b/reactos/base/system/autochk/autochk.c @@ -277,6 +277,7 @@ CheckVolume( ANSI_STRING ChkdskFunctionName = RTL_CONSTANT_STRING("ChkdskEx"); PVOID Provider; CHKDSKEX ChkdskFunc; + WCHAR NtDrivePath[64]; UNICODE_STRING DrivePathU; NTSTATUS Status; @@ -315,7 +316,11 @@ CheckVolume( /* Call provider */ //PrintString(" Verifying volume %S\n", DrivePath); - RtlInitUnicodeString(&DrivePathU, DrivePath); + swprintf(NtDrivePath, L"\\??\\"); + wcscat(NtDrivePath, DrivePath); + NtDrivePath[wcslen(NtDrivePath)-1] = 0; + RtlInitUnicodeString(&DrivePathU, NtDrivePath); + Status = ChkdskFunc(&DrivePathU, TRUE, // FixErrors TRUE, // Verbose