Subject: Re: bug#57386: 29.0.50; support make-symbolic-link without admin priviledge on Windows

From: Kiên Nguyễn Quang <[email-masked]>
Date: Thu, 25 Aug 2022 10:30:01 +0900

In my new patch, if we received the ERROR_INVALID_PARAMETER, we will try to
create the symbolic link again without the new flag.
Isn't that ok for now?
The Windows version API has returned the same thing from the start of
Windows 10 so we pretty much can't detect the Windows version by using it.
Unless we read the information directly from the registry and parse it by
ourselves, which is something I would like to avoid.

On Thu, Aug 25, 2022 at 3:26 AM Eli Zaretskii <[email-masked]> wrote:

> > From: Kiên Nguyễn Quang <[email-masked]>
> > Date: Thu, 25 Aug 2022 03:05:37 +0900
> > Cc: [email-masked]
> >
> > You're right, there's a stupid check against parameters on the version
> that doesn't support the new flag.
> > Since from Windows 10, the Windows version checking is not recommended
> (and not accurate) anymore, I
> > think we can just retry if the function is called with invalid
> parameters.
> > That will probably slow down the down-level Windows versions, but the
> difference should not be too much.
>
> Unfortunately, invalid parameters could cause Emacs to abort,
> depending on how it was linked.  So I still think checking the version
> of Windows is the way to go.  That MS don't recommend that doesn't
> mean we must abide by their recommendations.
>