From owner-freebsd-current@FreeBSD.ORG Tue Jul 1 15:56:45 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2DAF91065673 for ; Tue, 1 Jul 2008 15:56:45 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from kientzle.com (h-66-166-149-50.snvacaid.covad.net [66.166.149.50]) by mx1.freebsd.org (Postfix) with ESMTP id 0BCAF8FC1F for ; Tue, 1 Jul 2008 15:56:44 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from [10.0.0.128] (p54.kientzle.com [66.166.149.54]) by kientzle.com (8.12.9/8.12.9) with ESMTP id m61FuTtv034883; Tue, 1 Jul 2008 08:56:29 -0700 (PDT) (envelope-from kientzle@freebsd.org) Message-ID: <486A53AD.9090904@freebsd.org> Date: Tue, 01 Jul 2008 08:56:29 -0700 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20060422 X-Accept-Language: en-us, en MIME-Version: 1.0 To: vova@fbsd.ru References: <20080626110521.GA68764@wep4017.physik.uni-wuerzburg.de> <1214815958.3581.67.camel@localhost> <486901FB.5080308@freebsd.org> <1214842042.8768.12.camel@localhost> <4869C4C4.1050806@freebsd.org> <1214900266.1947.13.camel@localhost> In-Reply-To: <1214900266.1947.13.camel@localhost> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org Subject: Re: cpio -dumpl damages the files? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jul 2008 15:56:45 -0000 Vladimir Grebenschikov wrote: > On Mon, 2008-06-30 at 22:46 -0700, Tim Kientzle wrote: > >>Vladimir Grebenschikov wrote: >> >>> >>>Files are not corrupted any more, but strange message for every >>>directory still shown. >> >>Yes. I think I just fixed this. Please let me know if >>you see any other problems. > > Now it works ok with directories, but I think, condition is too generic: > > + if (cpio->option_link > + && archive_entry_filetype(entry) != AE_IFDIR) > + { [ ... example showing breakage copying symlinks ... ] Try adding the following to the above condition: && archive_entry_filetype(entry) != AE_IFLNK