From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.42.229.71 with SMTP id jh7cs177254icb; Wed, 19 Jan 2011 10:08:16 -0800 (PST) Received: by 10.143.40.9 with SMTP id s9mr996157wfj.366.1295460496307; Wed, 19 Jan 2011 10:08:16 -0800 (PST) Return-Path: Received: from rubyforge.org (rubyforge.org [205.234.109.19]) by mx.google.com with ESMTP id d14si7038722vcx.147.2011.01.19.10.08.15; Wed, 19 Jan 2011 10:08:16 -0800 (PST) Received-SPF: pass (google.com: domain of sup-devel-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) client-ip=205.234.109.19; Authentication-Results: mx.google.com; spf=pass (google.com: domain of sup-devel-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) smtp.mail=sup-devel-bounces@rubyforge.org Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id C193E19782F8; Wed, 19 Jan 2011 13:08:15 -0500 (EST) Received: from entry.masanjin.net (masanjin.net [209.20.72.13]) by rubyforge.org (Postfix) with ESMTP id 7627B1858361 for ; Wed, 19 Jan 2011 12:19:11 -0500 (EST) Received: from w by entry.masanjin.net with local (Exim 4.69) (envelope-from ) id 1Pfbgd-0007yW-3f for sup-devel@rubyforge.org; Wed, 19 Jan 2011 12:19:11 -0500 From: William Morgan To: sup-devel In-reply-to: <1295451265-sup-1883@masanjin.net> References: <1295375324-2496-1-git-send-email-sascha-pgp@silbe.org> <1295375324-2496-2-git-send-email-sascha-pgp@silbe.org> <1295451265-sup-1883@masanjin.net> Date: Wed, 19 Jan 2011 12:19:11 -0500 Message-Id: <1295457514-sup-3702@masanjin.net> User-Agent: Sup/git Subject: Re: [sup-devel] [PATCH 2/2] {config, sources}.yaml: preserve symlinks and permissions X-BeenThere: sup-devel@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: Sup developer discussion List-Id: Sup developer discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: sup-devel-bounces@rubyforge.org Errors-To: sup-devel-bounces@rubyforge.org Reformatted excerpts from William Morgan's message of 2011-01-19: > Reformatted excerpts from Sascha Silbe's message of 2011-01-18: > > + unless File.exists?(backup_fn) && File.size(fn) == 0 > > This line is giving me some problems when fn doesn't exist (e.g. when > running sup-sync the first time without a config.yaml). Should it be > > File.exists?(backup_fn) && File.exists?(fn) && File.size(fn) == 0 > > instead? Actually, I think it should be: if File.exists?(fn) && File.size(fn) > 0 Which has the advantage of actually working... -- William _______________________________________________ Sup-devel mailing list Sup-devel@rubyforge.org http://rubyforge.org/mailman/listinfo/sup-devel