[g2port] [cvs HEAD] don't allow selection of directory for save file

Derek Atkins warlord at MIT.EDU
Sun Jun 22 20:49:27 CDT 2003


Applied.

In the future, can you please send your patches as an attachement
so your mailer doesn't destroy them by auto line-termination?

-derek

sams at marketing-designs.com writes:

> Index: src/backend/file/gnc-backend-file.c
> ===================================================================
> RCS file:
> /home/cvs/cvsroot/gnucash/src/backend/file/gnc-backend-file.c,v
> retrieving revision 1.23
> diff -u -r1.23 gnc-backend-file.c
> --- src/backend/file/gnc-backend-file.c 5 Jan 2003 02:03:42 -0000
> 1.23
> +++ src/backend/file/gnc-backend-file.c 17 Jun 2003 20:13:20 -0000
> @@ -118,6 +118,14 @@
>              g_free (be->dirname); be->dirname = NULL;
>              return;
>          }
> +        rc = stat (be->fullpath, &statbuf);
> +        if (rc != 0 || S_ISDIR(statbuf.st_mode))
> +        {
> +            xaccBackendSetError (be_start,
> ERR_FILEIO_UNKNOWN_FILE_TYPE);
> +            g_free (be->fullpath); be->fullpath = NULL;
> +            g_free (be->dirname); be->dirname = NULL;
> +            return;
> +        }
>      }
>                                                                                 
>      /* ---------------------------------------------------- */
> 
> _______________________________________________
> gnucash-patches mailing list
> gnucash-patches at lists.gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-patches

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available


More information about the gnucash-patches mailing list