From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#8035: Processing of .. in a file path after going thru symlink Date: Thu, 26 Aug 2021 20:08:30 +0300 Message-ID: <83mtp4rv5d.fsf@gnu.org> References: <30918394.post@talk.nabble.com> <877dg8yxrx.fsf@gnus.org> <83sfywrw9w.fsf@gnu.org> <87sfywxhnn.fsf@gnus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23463"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 8035@debbugs.gnu.org, slpnabble@blackberry-hill.com To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 26 19:21:25 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mJJ46-0005m2-MH for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 26 Aug 2021 19:21:22 +0200 Original-Received: from localhost ([::1]:41688 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mJJ44-0002mz-QW for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 26 Aug 2021 13:21:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46680) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mJIt8-00043D-9A for bug-gnu-emacs@gnu.org; Thu, 26 Aug 2021 13:10:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38771) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mJIt8-0004QL-1E for bug-gnu-emacs@gnu.org; Thu, 26 Aug 2021 13:10:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mJIt7-0000UO-SJ for bug-gnu-emacs@gnu.org; Thu, 26 Aug 2021 13:10:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 26 Aug 2021 17:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8035 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 8035-submit@debbugs.gnu.org id=B8035.16299977421782 (code B ref 8035); Thu, 26 Aug 2021 17:10:01 +0000 Original-Received: (at 8035) by debbugs.gnu.org; 26 Aug 2021 17:09:02 +0000 Original-Received: from localhost ([127.0.0.1]:50317 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJIs9-0000Sb-S7 for submit@debbugs.gnu.org; Thu, 26 Aug 2021 13:09:02 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:58618) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJIs5-0000S3-3k for 8035@debbugs.gnu.org; Thu, 26 Aug 2021 13:09:01 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:43624) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mJIry-0003jO-TT; Thu, 26 Aug 2021 13:08:51 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3685 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mJIry-0000G8-G6; Thu, 26 Aug 2021 13:08:50 -0400 In-Reply-To: <87sfywxhnn.fsf@gnus.org> (message from Lars Ingebrigtsen on Thu, 26 Aug 2021 19:03:24 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:212736 Archived-At: > From: Lars Ingebrigtsen > Cc: slpnabble@blackberry-hill.com, 8035@debbugs.gnu.org > Date: Thu, 26 Aug 2021 19:03:24 +0200 > > Eli Zaretskii writes: > > >> I'm guessing it's calling expand-file-name here to resolve "~"? > > > > No, because we always must call expand-file-name before invoking a > > libc function that accesses files -- to support file names relative to > > their buffer's default-directory. > > These are absolute file names, though. I can understand expanding if > they're not. You asked why expand-file-name is there in general, so I gave a general explanation. expand-file-name also normalizes file names, though. Which is also needed in some use cases, e.g. when the /foo/bar/ isn't accessible, but /foo/ is, in which case failing to normalize /foo/bar/../quux could fail some file I/O function.