[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: CVS update: gattrib.c



  User: ahvezda 
  Date: 05/03/06 21:11:27

  Modified:    .        gattrib.c
  Log:
  Fixed bug that didn't allow absolute path specification on all libgeda
  
  applications.  Moved old schematic into test directory.  Updated some golden
  
  netlist files.
  
  
  
  
  Revision  Changes    Path
  1.14      +15 -4     eda/geda/devel/gattrib/src/gattrib.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: gattrib.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/gattrib/src/gattrib.c,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -b -r1.13 -r1.14
  --- gattrib.c	21 Feb 2005 05:29:33 -0000	1.13
  +++ gattrib.c	7 Mar 2005 02:11:27 -0000	1.14
  @@ -204,10 +204,21 @@
      * position of the first filename  */
     i = argv_index;
     while(argv[i] != NULL) {
  -    gchar *temp_filename = g_build_path (G_DIR_SEPARATOR_S,
  -					 cwd,
  -					 argv[i],
  -					 NULL);
  +
  +    gchar *temp_filename;
  +#ifdef __MINGW32__
  +    if (argv[i][1] == ':' && (argv[i][2] == G_DIR_SEPARATOR ||
  +                              argv[i][2] == OTHER_PATH_SEPARATER_CHAR))
  +#else
  +    if (argv[i][0] == G_DIR_SEPARATOR)
  +#endif
  +    {
  +      /* Path is already absolute so no need to do any concat of cwd */
  +      temp_filename = g_strdup(argv[i]);
  +    } else {
  +      temp_filename = g_build_path (G_DIR_SEPARATOR_S, cwd, argv[i], NULL);
  +    }
  +
       gchar *filename = f_normalize_filename(temp_filename);
       g_free(temp_filename);