You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Philip Martin <ph...@codematters.co.uk> on 2002/08/11 22:57:35 UTC

Re: svn commit: rev 2943 - trunk/subversion/libsvn_wc

rooneg@tigris.org writes:

> Modified: trunk/subversion/libsvn_wc/adm_files.c
> ==============================================================================
> --- trunk/subversion/libsvn_wc/adm_files.c	(original)
> +++ trunk/subversion/libsvn_wc/adm_files.c	Sun Aug 11 17:11:15 2002
> @@ -924,8 +924,8 @@
>    svn_error_t *err = NULL;
>    enum svn_node_kind kind;
>    svn_boolean_t dir_exists = FALSE, wc_exists = FALSE;
> -  apr_file_t *f = NULL;
>    const char *tmp_path;
> +  apr_finfo_t finfo;
>  
>    /** Step 1: check that the directory exists. **/
>  
> @@ -963,7 +963,9 @@
>    /** The directory exists, but is it a valid working copy yet?
>        Try step 2: checking that SVN_WC__ADM_README exists. **/
>  
> -  err = svn_wc__open_adm_file (&f, path, SVN_WC__ADM_README, APR_READ, pool);
> +  err = svn_io_stat (&finfo, svn_path_join (tmp_path, SVN_WC__ADM_README, pool),
> +                     APR_FINFO_MIN, pool);
> +

Would svn_io_check_path && kind == svn_node_file be better?  That
boils down to a single stat call.  Thinking of a directory called
README...

-- 
Philip Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: rev 2943 - trunk/subversion/libsvn_wc

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On Sun, Aug 11, 2002 at 11:57:35PM +0100, Philip Martin wrote:
 
> Would svn_io_check_path && kind == svn_node_file be better?  That
> boils down to a single stat call.  Thinking of a directory called
> README...

good point.  i suppose if we say 'who would be insane enough to have
something like that lying around' then we'll only be proven wrong
later when nature makes a better idiot...

-garrett 

-- 
garrett rooney                    Remember, any design flaw you're 
rooneg@electricjellyfish.net      sufficiently snide about becomes  
http://electricjellyfish.net/     a feature.       -- Dan Sugalski

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org