all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Kiên Nguyễn Quang" <kien.n.quang@gmail.com>
Cc: 57386@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	[thread overview]
Message-ID: <83h72050tc.fsf@gnu.org> (raw)
In-Reply-To: <CAL7sU5jnA-C2uLfeQKMHK1JC9=meX_QRNkLtaKsfuCez9baJ8w@mail.gmail.com> (message from Kiên Nguyễn Quang on Thu, 25 Aug 2022 10:30:01 +0900)

> From: Kiên Nguyễn Quang <kien.n.quang@gmail.com>
> Date: Thu, 25 Aug 2022 10:30:01 +0900
> Cc: 57386@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.





  reply	other threads:[~2022-08-25  5:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-24 15:33 bug#57386: 29.0.50; support make-symbolic-link without admin priviledge on Windows Kiên Nguyễn Quang
2022-08-24 16:00 ` Eli Zaretskii
2022-08-24 18:05   ` Kiên Nguyễn Quang
2022-08-24 18:26     ` Eli Zaretskii
2022-08-25  1:30       ` Kiên Nguyễn Quang
2022-08-25  5:50         ` Eli Zaretskii [this message]
2022-08-25  8:52           ` Kiên Nguyễn Quang
2022-08-25  9:09             ` Eli Zaretskii
2022-08-25  9:51               ` Kiên Nguyễn Quang
2022-08-25  9:57                 ` Eli Zaretskii
2022-08-25 10:32                   ` Kiên Nguyễn Quang
2022-08-25 13:22                     ` Eli Zaretskii
2022-08-25 11:35                 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-25 12:59                   ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83h72050tc.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=57386@debbugs.gnu.org \
    --cc=kien.n.quang@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.