This is the mail archive of the cygwin-developers@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]