From unknown Sun Jun 22 00:37:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51754: 29.0.50; [PATCH] tramp-compat-file-name-concat work in wrong way Resent-From: Aleksandr Vityazev Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 10 Nov 2021 18:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 51754 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 51754@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.163657061018228 (code B ref -1); Wed, 10 Nov 2021 18:57:01 +0000 Received: (at submit) by debbugs.gnu.org; 10 Nov 2021 18:56:50 +0000 Received: from localhost ([127.0.0.1]:39209 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mksmA-0004jw-4y for submit@debbugs.gnu.org; Wed, 10 Nov 2021 13:56:50 -0500 Received: from lists.gnu.org ([209.51.188.17]:60700) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mksm5-0004jm-DW for submit@debbugs.gnu.org; Wed, 10 Nov 2021 13:56:48 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38042) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mksm4-0005x8-Sr for bug-gnu-emacs@gnu.org; Wed, 10 Nov 2021 13:56:45 -0500 Received: from mout02.posteo.de ([185.67.36.66]:49079) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mksm2-0001X8-OT for bug-gnu-emacs@gnu.org; Wed, 10 Nov 2021 13:56:44 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 2D6AF240104 for ; Wed, 10 Nov 2021 19:56:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.org; s=2017; t=1636570595; bh=iARwbvRVrtAGey+w3zRI7eeuoIv1zkm2lhWUZ+aFUJU=; h=From:To:Subject:Date:From; b=WyXiHJrSbkaK22wPIB/N7+atpfE7rTIxODnx/jQrI1EC4fA9+IP3eB92Z/Oa2qvhR tKWRbApDkTvAYAdhd2VWFsBgzhiKZcf/13Zay0IhSzJG0l0494vZnXTGBjtFu7OvtW Moij9c/FTQJuGn6cqQueSCA1oA86J/vKZmd5R44iur9kgEV8SS5n54oxqR3XMsRUUe an8NUvJCqeCF/U690q75+f1IGMn4waM4XFPIGLXYsHYel9FZ5Nl/DjvGg6+Sbft59U J6zR0yVTYsZGhGhF/kFgmAFWMgpm9GsJCi6+ftsEsxy0HfAc8UltQwTJf8a0LWPBma PpEwUq16JA3sg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4HqDbQ24SNz9rxB for ; Wed, 10 Nov 2021 19:56:34 +0100 (CET) From: Aleksandr Vityazev Date: Wed, 10 Nov 2021 18:56:49 +0000 Message-ID: <87czn7hma6.fsf@posteo.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=185.67.36.66; envelope-from=avityazev@posteo.org; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello,=20 The current implementation of the tramp-compat-file-name-concat=20 from lisp/net/tramp-compat.el fails test fileio-tests/file-name-concat from file test/src/fileio-tests.el for file-name-concat on Emacs where no file-name-concat. #+begin_src elisp (ert-deftest test-tramp-compat-file-name-concat () (should (equal (tramp-compat-file-name-concat "foo" "bar") "foo/bar")) (should (equal (tramp-compat-file-name-concat "foo" "bar") "foo/bar")) (should (equal (tramp-compat-file-name-concat "foo" "bar" "zot") "foo/bar= /zot")) (should (equal (tramp-compat-file-name-concat "foo/" "bar") "foo/bar")) (should (equal (tramp-compat-file-name-concat "foo//" "bar") "foo//bar")) (should (equal (tramp-compat-file-name-concat "foo/" "bar/" "zot") "foo/b= ar/zot")) (should (equal (tramp-compat-file-name-concat "f=C3=B3o" "bar") "f=C3=B3o= /bar")) (should (equal (tramp-compat-file-name-concat "foo" "b=C3=A1r") "foo/b=C3= =A1r")) (should (equal (tramp-compat-file-name-concat "f=C3=B3o" "b=C3=A1r") "f= =C3=B3o/b=C3=A1r")) (let ((string (make-string 5 ?a))) (should (not (multibyte-string-p string))) (aset string 2 255) (should (not (multibyte-string-p string))) (should (equal (tramp-compat-file-name-concat "f=C3=B3o" string) "f=C3= =B3o/aa\377aa"))) (should (equal (tramp-compat-file-name-concat "foo") "foo")) (should (equal (tramp-compat-file-name-concat "foo/") "foo/")) (should (equal (tramp-compat-file-name-concat "foo" "") "foo")) (should (equal (tramp-compat-file-name-concat "foo" "" "" "" nil) "foo")) (should (equal (tramp-compat-file-name-concat "" "bar") "bar")) (should (equal (tramp-compat-file-name-concat "" "") ""))) (ert 'test-tramp-compat-file-name-concat) #+end_src --=-=-= Content-Type: text/plain Content-Disposition: inline; filename=test-tramp-compat-file-name-concat.ert Content-Description: test-tramp-compat-file-name-concat Selector: test-tramp-compat-file-name-concat Passed: 0 Failed: 1 (1 unexpected) Skipped: 0 Total: 1/1 Started at: 2021-11-10 21:21:24+0300 Finished. Finished at: 2021-11-10 21:21:25+0300 F F test-tramp-compat-file-name-concat (wrong-type-argument characterp "zot") --=-=-= Content-Type: text/plain Here is the patch to fix: --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-lisp-net-tramp-compat.el-Fix-tramp-compat-file-name-.patch Content-Description: tramp-compat-file-name-concat >From 1a0c540abfc129d67bf2e291c038c2163f7fee7f Mon Sep 17 00:00:00 2001 From: Aleksandr Vityazev Date: Wed, 10 Nov 2021 21:36:16 +0300 Subject: [PATCH] * lisp/net/tramp-compat.el: Fix tramp-compat-file-name-concat * lisp/net/tramp-compat.el: Make tramp-compat-file-name-concat work like file-name-concat. --- lisp/net/tramp-compat.el | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el index 213ab5857c..fbc3d684ce 100644 --- a/lisp/net/tramp-compat.el +++ b/lisp/net/tramp-compat.el @@ -386,14 +386,17 @@ CONDITION can also be a list of error conditions." (if (fboundp 'file-name-concat) #'file-name-concat (lambda (directory &rest components) - (unless (null directory) - (let ((components (delq nil components)) - file-name-handler-alist) - (if (null components) - directory - (tramp-compat-file-name-concat - (concat (file-name-as-directory directory) (car components)) - (cdr components)))))))) + (let ((components (cl-remove-if (lambda (el) + (or (null el) (equal "" el))) + components)) + file-name-handler-alist) + (if (null components) + directory + (apply #'tramp-compat-file-name-concat + (concat (unless (or (equal "" directory) (null directory)) + (file-name-as-directory directory)) + (car components)) + (cdr components))))))) (dolist (elt (all-completions "tramp-compat-" obarray 'functionp)) (put (intern elt) 'tramp-suppress-trace t)) -- 2.33.1 --=-=-= Content-Type: text/plain -- Best regards, Aleksandr Vityazev --=-=-=-- From unknown Sun Jun 22 00:37:38 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Aleksandr Vityazev Subject: bug#51754: closed (Re: bug#51754: 29.0.50; [PATCH] tramp-compat-file-name-concat work in wrong way) Message-ID: References: <878rxvhsa7.fsf@gmx.de> <87czn7hma6.fsf@posteo.org> X-Gnu-PR-Message: they-closed 51754 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 51754@debbugs.gnu.org Date: Thu, 11 Nov 2021 11:00:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1636628402-20917-1" This is a multi-part message in MIME format... ------------=_1636628402-20917-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #51754: 29.0.50; [PATCH] tramp-compat-file-name-concat work in wrong way which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 51754@debbugs.gnu.org. --=20 51754: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D51754 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1636628402-20917-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 51754-done) by debbugs.gnu.org; 11 Nov 2021 10:59:42 +0000 Received: from localhost ([127.0.0.1]:40271 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ml7ny-0005QU-53 for submit@debbugs.gnu.org; Thu, 11 Nov 2021 05:59:42 -0500 Received: from mout.gmx.net ([212.227.15.19]:45679) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ml7nt-0005QA-1A for 51754-done@debbugs.gnu.org; Thu, 11 Nov 2021 05:59:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1636628369; bh=coc7oUeR7FNZswIrTnGHBFEMJm7AJLmJBi/tHr2q7pw=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=dAU60Q/6q1dw4p5MLAW24lZoiBy7wdaWifX8sGsPH21wG3vyYl5If7/FTVi3tEShw +QODbhok0fxd6InGoApvW7sHk47pSfloKACv/LuNeHOYlCDgeZoyqqmtj2nk6WYy91 d9Iu8oTFbm1TJyVUyh37tHenxXJNepLBGLKr0d/0= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([213.220.159.17]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1M59GA-1mk1LB220C-001BWl; Thu, 11 Nov 2021 11:59:29 +0100 From: Michael Albinus To: Aleksandr Vityazev Subject: Re: bug#51754: 29.0.50; [PATCH] tramp-compat-file-name-concat work in wrong way References: <87czn7hma6.fsf@posteo.org> Date: Thu, 11 Nov 2021 11:59:28 +0100 In-Reply-To: <87czn7hma6.fsf@posteo.org> (Aleksandr Vityazev's message of "Wed, 10 Nov 2021 18:56:49 +0000") Message-ID: <878rxvhsa7.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:+7WcV0XDnQAiZxVkLWWchMuzJFh2VEYzLzAtUHjXz7glgcFdLnB ocDd96/TjRKOmYKqOP2r9KAGoJixF1eOSgmRQxVMdPvEdSId295fkYuN0e1PiiVL0srMDyL FQjbZ8c8E1ihpxwJmEwhBEfB8fgdFLB1su9QUIGIrHSQL1WXArnq9GKsbTSb3EWw3e/rzWb 1d1yZXwGJo8ad8Q6RGFgQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:IZgf8O9+RAQ=:bDFG4dUzPvJbHQAoSSw9wE apHy55mSx9n6iWKAr4VkkAKcni+QLdPYA3JwNnppuR1Vx5scelYRKM9EhC8qqisRpSBpzoplt ngBuWVpRQREtXQOu/8z19avjEGqnqh1w/onjRKutkagT5+Yl0B5Tf0LVIOHG741jhEYoMnbog NqM9hCSTI4WxQUsVChQK3B9z05s8leoL06xoRbm0NYkNXydN1GiyHj4CE3K6qLD+hn0+GPQb4 X/wklqkPI4VeP6Mq98Y0NniB/0E9QqrV4kz10bcKbQE6IM9NJAZ9bpraKkma/4gat3n4civY9 Ks7R7LAEBRCzetn+IXucKt7gtIGhl9IE0RFafMk1CgVfHBsZQIYI8BqRktudWYcV09JtmIyTl OhYJnFSvP2IaTqckGCLbIFnoCm3hEV3YZwfmoL1dxCD6iYNDxEg7sr9sd4j+icWpLhrxfC/kQ LlaVsGIa33mDkIli03qlpUAmYN39qlFTe9FVYNhjTt+wC3A3+hUjH97QMDjw3mlbHG9FifYFY rASGkklZ8xMkAVzaVQKGyMivWbfXXL6LxUCjk1TvvStzhayg3ceVTmr2y/YJ1iCnhIqJvpe4s ndBz4HatEdsI5Lovv0Pkw/08BDYfzR/QlZL7jX0wbow0hXm1qunnFHXYDC+Q/O4DGd/sefOQ9 rACq1pt91vJArlF98bGvAFd0qUIym3w4EuJsSa8+oM6baJd7Kf2cgaHy2nWjcsVYsG8dADmpr AJcp44F16ylh363f7D1V0zpsdZNfQMxKbo4q7yHMbXC7g+UtvSQSFHnbpIai9ppuYdYW7sVjQ bckSqjGGcgfGysIxQsHcvmRDRU1sIE4UwZLvLvlnWyKahTfM7KP/qj3QkV1TWPGzhPNnB2OJ0 6ejR3NIJapfMc4/1aaq5E6g0Q8PLnquprPbpy3FkaQBit7ZuLN/i5hPiDfPVa9qFruywxfKgM qtLlulZjw3H8/5C/P8bNFd82HaXkf/dFCldo54RJbmItK382TyS9ZFm3/J2qUEKOdACvcOQx3 a1G/937wav8cOL4QMadgVSJuOnGUJ9RaMSrHVqTxXmteQGH0oXyaKNbxzD1b1mKgssLhG5Tra kCrIBaSQh4LVJ8= Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 51754-done Cc: 51754-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Version: 28.1 Aleksandr Vityazev writes: > Hello, Hi Aleksandr, > The current implementation of the tramp-compat-file-name-concat > from lisp/net/tramp-compat.el fails test fileio-tests/file-name-concat > from file test/src/fileio-tests.el for file-name-concat on Emacs where n= o > file-name-concat. Thanks for the report. I've applied your patch to the emacs-28 branch, and merged this to the master branch. Closing the bug. Best regards, Michael. ------------=_1636628402-20917-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 10 Nov 2021 18:56:50 +0000 Received: from localhost ([127.0.0.1]:39209 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mksmA-0004jw-4y for submit@debbugs.gnu.org; Wed, 10 Nov 2021 13:56:50 -0500 Received: from lists.gnu.org ([209.51.188.17]:60700) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mksm5-0004jm-DW for submit@debbugs.gnu.org; Wed, 10 Nov 2021 13:56:48 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38042) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mksm4-0005x8-Sr for bug-gnu-emacs@gnu.org; Wed, 10 Nov 2021 13:56:45 -0500 Received: from mout02.posteo.de ([185.67.36.66]:49079) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mksm2-0001X8-OT for bug-gnu-emacs@gnu.org; Wed, 10 Nov 2021 13:56:44 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 2D6AF240104 for ; Wed, 10 Nov 2021 19:56:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.org; s=2017; t=1636570595; bh=iARwbvRVrtAGey+w3zRI7eeuoIv1zkm2lhWUZ+aFUJU=; h=From:To:Subject:Date:From; b=WyXiHJrSbkaK22wPIB/N7+atpfE7rTIxODnx/jQrI1EC4fA9+IP3eB92Z/Oa2qvhR tKWRbApDkTvAYAdhd2VWFsBgzhiKZcf/13Zay0IhSzJG0l0494vZnXTGBjtFu7OvtW Moij9c/FTQJuGn6cqQueSCA1oA86J/vKZmd5R44iur9kgEV8SS5n54oxqR3XMsRUUe an8NUvJCqeCF/U690q75+f1IGMn4waM4XFPIGLXYsHYel9FZ5Nl/DjvGg6+Sbft59U J6zR0yVTYsZGhGhF/kFgmAFWMgpm9GsJCi6+ftsEsxy0HfAc8UltQwTJf8a0LWPBma PpEwUq16JA3sg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4HqDbQ24SNz9rxB for ; Wed, 10 Nov 2021 19:56:34 +0100 (CET) From: Aleksandr Vityazev To: bug-gnu-emacs@gnu.org Subject: 29.0.50; [PATCH] tramp-compat-file-name-concat work in wrong way Date: Wed, 10 Nov 2021 18:56:49 +0000 Message-ID: <87czn7hma6.fsf@posteo.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=185.67.36.66; envelope-from=avityazev@posteo.org; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello,=20 The current implementation of the tramp-compat-file-name-concat=20 from lisp/net/tramp-compat.el fails test fileio-tests/file-name-concat from file test/src/fileio-tests.el for file-name-concat on Emacs where no file-name-concat. #+begin_src elisp (ert-deftest test-tramp-compat-file-name-concat () (should (equal (tramp-compat-file-name-concat "foo" "bar") "foo/bar")) (should (equal (tramp-compat-file-name-concat "foo" "bar") "foo/bar")) (should (equal (tramp-compat-file-name-concat "foo" "bar" "zot") "foo/bar= /zot")) (should (equal (tramp-compat-file-name-concat "foo/" "bar") "foo/bar")) (should (equal (tramp-compat-file-name-concat "foo//" "bar") "foo//bar")) (should (equal (tramp-compat-file-name-concat "foo/" "bar/" "zot") "foo/b= ar/zot")) (should (equal (tramp-compat-file-name-concat "f=C3=B3o" "bar") "f=C3=B3o= /bar")) (should (equal (tramp-compat-file-name-concat "foo" "b=C3=A1r") "foo/b=C3= =A1r")) (should (equal (tramp-compat-file-name-concat "f=C3=B3o" "b=C3=A1r") "f= =C3=B3o/b=C3=A1r")) (let ((string (make-string 5 ?a))) (should (not (multibyte-string-p string))) (aset string 2 255) (should (not (multibyte-string-p string))) (should (equal (tramp-compat-file-name-concat "f=C3=B3o" string) "f=C3= =B3o/aa\377aa"))) (should (equal (tramp-compat-file-name-concat "foo") "foo")) (should (equal (tramp-compat-file-name-concat "foo/") "foo/")) (should (equal (tramp-compat-file-name-concat "foo" "") "foo")) (should (equal (tramp-compat-file-name-concat "foo" "" "" "" nil) "foo")) (should (equal (tramp-compat-file-name-concat "" "bar") "bar")) (should (equal (tramp-compat-file-name-concat "" "") ""))) (ert 'test-tramp-compat-file-name-concat) #+end_src --=-=-= Content-Type: text/plain Content-Disposition: inline; filename=test-tramp-compat-file-name-concat.ert Content-Description: test-tramp-compat-file-name-concat Selector: test-tramp-compat-file-name-concat Passed: 0 Failed: 1 (1 unexpected) Skipped: 0 Total: 1/1 Started at: 2021-11-10 21:21:24+0300 Finished. Finished at: 2021-11-10 21:21:25+0300 F F test-tramp-compat-file-name-concat (wrong-type-argument characterp "zot") --=-=-= Content-Type: text/plain Here is the patch to fix: --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-lisp-net-tramp-compat.el-Fix-tramp-compat-file-name-.patch Content-Description: tramp-compat-file-name-concat >From 1a0c540abfc129d67bf2e291c038c2163f7fee7f Mon Sep 17 00:00:00 2001 From: Aleksandr Vityazev Date: Wed, 10 Nov 2021 21:36:16 +0300 Subject: [PATCH] * lisp/net/tramp-compat.el: Fix tramp-compat-file-name-concat * lisp/net/tramp-compat.el: Make tramp-compat-file-name-concat work like file-name-concat. --- lisp/net/tramp-compat.el | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el index 213ab5857c..fbc3d684ce 100644 --- a/lisp/net/tramp-compat.el +++ b/lisp/net/tramp-compat.el @@ -386,14 +386,17 @@ CONDITION can also be a list of error conditions." (if (fboundp 'file-name-concat) #'file-name-concat (lambda (directory &rest components) - (unless (null directory) - (let ((components (delq nil components)) - file-name-handler-alist) - (if (null components) - directory - (tramp-compat-file-name-concat - (concat (file-name-as-directory directory) (car components)) - (cdr components)))))))) + (let ((components (cl-remove-if (lambda (el) + (or (null el) (equal "" el))) + components)) + file-name-handler-alist) + (if (null components) + directory + (apply #'tramp-compat-file-name-concat + (concat (unless (or (equal "" directory) (null directory)) + (file-name-as-directory directory)) + (car components)) + (cdr components))))))) (dolist (elt (all-completions "tramp-compat-" obarray 'functionp)) (put (intern elt) 'tramp-suppress-trace t)) -- 2.33.1 --=-=-= Content-Type: text/plain -- Best regards, Aleksandr Vityazev --=-=-=-- ------------=_1636628402-20917-1--