Skip to content

Commit 856cbf0

Browse files
committed
Add IsLongPathAwareProcess and remove legacy LastWriteTime
1 parent 6b34bbe commit 856cbf0

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

phlib/native.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4293,9 +4293,6 @@ NTSTATUS PhSetFileBasicInformation(
42934293
{
42944294
IO_STATUS_BLOCK isb;
42954295

4296-
// Set to SIZE_MAX to ignore updating the value (dmex)
4297-
BasicInfo->LastWriteTime.QuadPart = SIZE_MAX;
4298-
42994296
return NtSetInformationFile(
43004297
FileHandle,
43014298
&isb,
@@ -9307,14 +9304,14 @@ NTSTATUS PhDosLongPathNameToNtPathNameWithStatus(
93079304
static NTSTATUS (NTAPI* RtlDosLongPathNameToNtPathName_I_WithStatus)(
93089305
_In_ PCWSTR DosFileName,
93099306
_Out_ PUNICODE_STRING NtFileName,
9310-
_Out_opt_ PWSTR * FilePart,
9307+
_Out_opt_ PWSTR *FilePart,
93119308
_Out_opt_ PRTL_RELATIVE_NAME_U RelativeName
93129309
) = NULL;
93139310
NTSTATUS status;
93149311

93159312
if (PhBeginInitOnce(&initOnce))
93169313
{
9317-
if (WindowsVersion >= WINDOWS_10_RS1) // RtlAreLongPathsEnabled() // always true
9314+
if (WindowsVersion >= WINDOWS_10_RS1 && NtCurrentPeb()->IsLongPathAwareProcess) // RtlAreLongPathsEnabled()
93189315
{
93199316
PVOID baseAddress;
93209317

0 commit comments

Comments
 (0)