GNU bug report logs - #57386
29.0.50; support make-symbolic-link without admin priviledge on Windows

Previous Next

Package: emacs;

Reported by: Kiên Nguyễn Quang <kien.n.quang <at> gmail.com>

Date: Wed, 24 Aug 2022 15:35:02 UTC

Severity: normal

Found in version 29.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Kiên Nguyễn Quang <kien.n.quang <at> gmail.com>
Cc: 57386 <at> debbugs.gnu.org
Subject: bug#57386: 29.0.50; support make-symbolic-link without admin priviledge on Windows
Date: Thu, 25 Aug 2022 08:50:23 +0300
> From: Kiên Nguyễn Quang <kien.n.quang <at> gmail.com>
> Date: Thu, 25 Aug 2022 10:30:01 +0900
> Cc: 57386 <at> debbugs.gnu.org
> 
> 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?

Sorry, no.  I want to avoid the ERROR_INVALID_PARAMETER error
entirely, for the reasons I explained up-thread.  That error happens
only if the underlying Windows version is too old and doesn't support
this flag, so a version check will avoid it.  If the Windows version
is new enough, that error will never happen, even if the Developer
Option is not activated; instead, the call will simply fail (with
ERROR_PRIVILEGE_NOT_HELD) as if the flag were never used.  So checking
the Windows version will allow us not to trigger the invalid parameter
error, and will also avoid calling the API twice.

> 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.

That's a separate problem, which we will resolve if and when it
becomes relevant.  For now, this problem doesn't exist, since AFAIK
there are no features yet which we want to use that are available only
in Windows 11 and later.  So please assume that version checks in
Emacs are reliable, and always will be, no matter what MS says about
that.

Thanks.




This bug report was last modified 2 years and 326 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.