From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 19 12:59:23 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2063716A4DE for ; Sat, 19 Aug 2006 12:59:23 +0000 (UTC) (envelope-from artifact.one@googlemail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.187]) by mx1.FreeBSD.org (Postfix) with ESMTP id C4CD343D72 for ; Sat, 19 Aug 2006 12:59:18 +0000 (GMT) (envelope-from artifact.one@googlemail.com) Received: by nf-out-0910.google.com with SMTP id n15so1692127nfc for ; Sat, 19 Aug 2006 05:59:17 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=googlemail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=b81kXhwD/3foLj3kGxfLedKhzsCjcu2UUminlvOkaqw8RhrYVI7NRaTJMz062JHdvvAOUFipaGzIcGm30d0qlynrZS3NcftB8W7Mur1sj823gENE8NaHb7pECbSf/cIMGuC9EmMCxSoZtOc6t2sE1PqIknw5P5xS3cT2HrWHgzo= Received: by 10.49.29.2 with SMTP id g2mr5260847nfj; Sat, 19 Aug 2006 05:59:17 -0700 (PDT) Received: by 10.49.54.3 with HTTP; Sat, 19 Aug 2006 05:59:17 -0700 (PDT) Message-ID: <8e96a0b90608190559x1b573455wf84fe039afc7fb3e@mail.gmail.com> Date: Sat, 19 Aug 2006 13:59:17 +0100 From: "mal content" To: freebsd-hackers@freebsd.org In-Reply-To: <20060819125315.GC192@britannica.bec.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <8e96a0b90608190527p3a2b9b90hf18b4a0f947cffec@mail.gmail.com> <20060819125315.GC192@britannica.bec.de> Subject: Re: Path transformation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Aug 2006 12:59:23 -0000 On 19/08/06, Joerg Sonnenberger wrote: > On Sat, Aug 19, 2006 at 01:27:49PM +0100, mal content wrote: > > Is there any code in the tree that does general path transformation > > or 'optimisation'? > > > > For example, this path corresponds to the current working directory: > > > > "dir1/dir2/dir3/../../../" > > It might or might not. E.g. dir2 could be a symlink. > Check realpath(3) and maybe the implementation of that as well. > > Joerg Ah, yes, didn't think of that. realpath() seems to be exactly what I'm looking for though, thanks! MC