delorie.com/archives/browse.cgi | search |
On Sep 14 01:12, Corinna Vinschen wrote: > On Sep 13 19:47, John Carey wrote: > > On Sep 11 03:30, Corinna Vinschen: > > Anyway, it looks to me as if overwriting the path in an existing > > VistaCwd instance would confuse RtlGetCurrentDirectory_U() and > > probably other Win32 API functions. (It may be that the same is > > true for the handle member; I have not tried to find that out.) > > Cygwin should probably allocate a new VistaCwd instance, > > as does the Win32 SetCurrentDirectory() implementation. >=20 > Hmm, I'm still wondering. In theory we don't have to replace the > directory name. We just have to InterlockedExchange the handle, since > we only need to replace the original handle which does not allow > sharing-for-delete with our own handle which does. >=20 > All other border cases (virtual dir, directory with restricted rights) > can be rightfully handled by setting the Win32 CWD to \\?\PIPE\ again. >=20 > That's at least worth a try, isn't it? Oh, I had thought that you wanted it for long paths and directories with restricted rights, too. There's one other issue: the new directory will limit deletion very briefly, until replaced. I don't know if that will bother people as much as the current situation. -- John -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |