From bab0d7083d7ff02cbbf2dc399238b71ab7fa52f0 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Thu, 16 Sep 2021 23:02:04 -0700 Subject: [PATCH] =?UTF-8?q?Set=20the=20current=20directory=20in=20?= =?UTF-8?q?=E2=80=98vc-p4-dir-extra-headers=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It seems like it might be possible that this function gets called in the wrong directory, so just to be sure set the current directory to the one passed in. This _should_ make sure that ‘p4’ is called in the right directory. --- vc-p4.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vc-p4.el b/vc-p4.el index b0fe7a8..25e18ee 100644 --- a/vc-p4.el +++ b/vc-p4.el @@ -1023,7 +1023,8 @@ documentation for that command for their meanings." (defun vc-p4-dir-extra-headers (dir) "Get extra Perforce-specific vc-dir headers related to DIR." - (let ((extra-info (p4-lowlevel-info))) + (let* ((default-directory dir) + (extra-info (p4-lowlevel-info))) (concat (propertize "Client :" 'face 'font-lock-type-face) " "