r16398 - gnucash/trunk/src/app-utils - In gncFindFile, use g_path_is_absolute instead of file[0]=='/'.

Chris Shoemaker c.shoemaker at cox.net
Mon Aug 6 21:46:06 EDT 2007


On Mon, Aug 06, 2007 at 08:56:40PM -0400, Andreas Köhler wrote:
> Author: andi5
> Date: 2007-08-06 20:56:40 -0400 (Mon, 06 Aug 2007)
> New Revision: 16398
> Trac: http://svn.gnucash.org/trac/changeset/16398
> 
> Modified:
>    gnucash/trunk/src/app-utils/file-utils.c
> Log:
> In gncFindFile, use g_path_is_absolute instead of file[0]=='/'.
> 
> 
> Modified: gnucash/trunk/src/app-utils/file-utils.c
> ===================================================================
> --- gnucash/trunk/src/app-utils/file-utils.c	2007-08-06 22:43:40 UTC (rev 16397)
> +++ gnucash/trunk/src/app-utils/file-utils.c	2007-08-07 00:56:40 UTC (rev 16398)
> @@ -86,7 +86,7 @@
>    if (!file || file[0] == '\0') return 0;
>  
>    /* take absolute paths without searching */
> -  if (file[0] != '/')
> +  if (!g_path_is_absolute (file))
>      filename = gncFindFile (file);
>    else
>      filename = g_strdup (file);
> 

Andi, 

  Do you happen to know if a non-absolute filename is even possible
here?  I looked into it a bit and couldn't see how it could occur.

-chris




More information about the gnucash-devel mailing list