On Dec 7 21:03, Ken Brown wrote: > I don't have any words of wisdom here, but I need to correct something I said > earlier. > > On 12/4/2019 3:50 PM, Ken Brown wrote: > > The assertion fails because 'Z:' doesn't contain a backslash. > > This is not quite right. It's true that path_conv::check strips the trailing > backslash from Z:\, but then it adds it back before calling > symlink_info::check: > > /* If path is only a drivename, Windows interprets it as the > current working directory on this drive instead of the root > dir which is what we want. So we need the trailing backslash > in this case. */ > if (full_path[0] && full_path[1] == ':' && full_path[2] == '\0') > { > full_path[2] = '\\'; > full_path[3] = '\0'; > } > > Thus symlink_info::check is in fact called on Z:\, but the assertion fails > because the code at path.cc:2905 is looking for a backslash prior to the > trailing backslash. So maybe the right fix for the assertion failure is the > following: > > --- a/winsup/cygwin/path.cc > +++ b/winsup/cygwin/path.cc > @@ -2895,7 +2895,8 @@ restart: > slow down normal operation. This extra check only kicks in if > we encountered a STATUS_OBJECT_NAME_NOT_FOUND *and* we didn't > already attach a suffix. */ > - if (!restarted && !*ext_here && !(mount_flags & MOUNT_DOS)) > + if (!restarted && !*ext_here && ext_here[-1] != '\\' > + && !(mount_flags & MOUNT_DOS)) > { > /* Check for trailing dot or space or leading space in > last component. */
Ok, please push that. I'll create a snapshot so Wilfed can test this. Thanks, Corinna -- Corinna Vinschen Cygwin Maintainer
signature.asc
Description: PGP signature