This is the mail archive of the
cygwin-developers@cygwin.com
mailing list for the Cygwin project.
Re: True case-sensitive filenames
- From: "Gerald S. Williams" <gsw at agere dot com>
- To: <cygwin-developers at cygwin dot com>
- Date: Fri, 24 Jan 2003 13:01:19 -0500
- Subject: Re: True case-sensitive filenames
> The next thing to try is attempting to set the current
> working directory using NtSetInformationProcess(). I'm
> currently way over my Cygwin-development allotment for
> this week, though.
I just couldn't let this one sit, so I stayed up late
working on it. Sure enough, you can set the current
directory in a case-sensitive fashion. I verified that
GetCurrentDirectory() responds to the change (Cygwin's
getcwd() currently doesn't, of course).
You don't actually use NtSetInformationProcess()--you
just need to get at the PEB somehow (you could use
NtQueryInformationProcess(), but NtCurrentTeb()->Peb
is faster). Peb->FastPebLockRoutine(Peb->FastPebLock)
locks the structure, then you can directly change
Peb->ProcessParameters->CurrentDirectoryHandle and
Peb->ProcessParameters->CurrentDirectoryName.
-Jerry