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

gEDA-cvs: CVS update: gschlas.c



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

  Modified:    .        gschlas.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 -5     eda/geda/devel/utils/gschlas/gschlas.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: gschlas.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/utils/gschlas/gschlas.c,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -b -r1.13 -r1.14
  --- gschlas.c	22 Feb 2005 19:54:01 -0000	1.13
  +++ gschlas.c	7 Mar 2005 02:11:39 -0000	1.14
  @@ -104,10 +104,20 @@
     
     i = argv_index;
     while (argv[i] != NULL) {
  -    gchar *filename = g_build_path (G_DIR_SEPARATOR_S,
  -                                    cwd,
  -                                    argv[i],
  -                                    NULL);
  +
  +    gchar *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 */
  +      filename = g_strdup (argv[i]);
  +    } else {
  +      filename = g_build_path (G_DIR_SEPARATOR_S, cwd, argv[i], NULL);
  +    }
       
       if (stat(filename, &buf) != 0) {
         s_log_message("Could not open [%s]\n", filename);