GNU bug report logs -
#49283
[PATCH] 27.2; `(call-process "program" null-device ...)' fails over TRAMP from local MS Windows
Previous Next
Reported by: Jim Porter <jporterbugs <at> gmail.com>
Date: Wed, 30 Jun 2021 05:15:01 UTC
Severity: normal
Tags: patch
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #29 received at 49283 <at> debbugs.gnu.org (full text, mbox):
> From: Jim Porter <jporterbugs <at> gmail.com>
> Date: Thu, 1 Jul 2021 12:45:42 -0700
> Cc: Michael Albinus <michael.albinus <at> gmx.de>, Lars Ingebrigtsen <larsi <at> gnus.org>, 49283 <at> debbugs.gnu.org
>
> > encode_current_directory returns an encoded file name. So if we make
> > this change, we should avoid calling ENCODE_FILE on it (doing so is a
> > no-op, but it's still unclean).
>
> I'd considered that when writing my initial patch to `call-process',
> but I wasn't sure what the most-correct way to avoid that would be. It
> seems we want an encoded path before returning from
> `encode_current_directory' in order to check that our result is
> actually accessible. But then that encoded dir gets passed in to
> `expand-file-name'. If INFILE is an un-encoded absolute path, wouldn't
> `expand-file-name' be un-encoded as well?
expand-file-name is not a problem, it can deal with encoded file
names. The problem is the calls to remove_slash_colon and
report_file_error: they should receive file names in their internal
representation.
> Maybe a better way would be to get the cwd *without* encoding it (see
> the attached patch). However, maybe there's a simpler answer to all of
> this that I just don't know about since I'm not very familiar with how
> Emacs encodes file names.
How about adding a 'bool' argument to encode_current_directory, so
that the caller could control whether or not it encodes the directory
file name? Then you could in this case tell encode_current_directory
not to encode the directory file name.
This bug report was last modified 3 years and 324 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.