From commits-return-2246-apmail-couchdb-commits-archive=couchdb.apache.org@couchdb.apache.org Thu Apr 09 22:37:13 2009 Return-Path: Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: (qmail 3851 invoked from network); 9 Apr 2009 22:37:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 9 Apr 2009 22:37:13 -0000 Received: (qmail 29616 invoked by uid 500); 9 Apr 2009 22:37:13 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 29539 invoked by uid 500); 9 Apr 2009 22:37:13 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 29530 invoked by uid 99); 9 Apr 2009 22:37:13 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Apr 2009 22:37:13 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Apr 2009 22:37:11 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 36E502388A23; Thu, 9 Apr 2009 22:36:50 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r763833 - /couchdb/trunk/src/couchdb/couch_file.erl Date: Thu, 09 Apr 2009 22:36:50 -0000 To: commits@couchdb.apache.org From: damien@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090409223650.36E502388A23@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: damien Date: Thu Apr 9 22:36:49 2009 New Revision: 763833 URL: http://svn.apache.org/viewvc?rev=763833&view=rev Log: Fix to allow couch_file use in tests without the server being started. Modified: couchdb/trunk/src/couchdb/couch_file.erl Modified: couchdb/trunk/src/couchdb/couch_file.erl URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_file.erl?rev=763833&r1=763832&r2=763833&view=diff ============================================================================== --- couchdb/trunk/src/couchdb/couch_file.erl (original) +++ couchdb/trunk/src/couchdb/couch_file.erl Thu Apr 9 22:36:49 2009 @@ -315,7 +315,7 @@ ok. track_stats() -> - try couch_stats_collector:increment({couchdb, open_os_files}) of + case (catch couch_stats_collector:increment({couchdb, open_os_files})) of ok -> Self = self(), spawn( @@ -323,8 +323,8 @@ erlang:monitor(process, Self), receive {'DOWN', _, _, _, _} -> ok end, couch_stats_collector:decrement({couchdb, open_os_files}) - end) - catch _ -> ok + end); + _ -> ok end. handle_call({pread, Pos, Bytes}, _From, Fd) ->