[GRASS-SVN] r54690 - grass/trunk/lib/imagery

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jan 17 15:06:29 PST 2013


Author: martinl
Date: 2013-01-17 15:06:28 -0800 (Thu, 17 Jan 2013)
New Revision: 54690

Modified:
   grass/trunk/lib/imagery/sigsetfile.c
Log:
imagerylib: fix I_fopen_sigset_file_old() for fully-qualified group names


Modified: grass/trunk/lib/imagery/sigsetfile.c
===================================================================
--- grass/trunk/lib/imagery/sigsetfile.c	2013-01-17 22:33:40 UTC (rev 54689)
+++ grass/trunk/lib/imagery/sigsetfile.c	2013-01-17 23:06:28 UTC (rev 54690)
@@ -77,15 +77,16 @@
 			      const char *name)
 {
     char element[GPATH_MAX];
+    char group_name[GNAME_MAX], group_mapset[GMAPSET_MAX];
     FILE *fd;
 
+    if (!G_name_is_fully_qualified(group, group_name, group_mapset)) {
+	strcpy(group_name, group);
+    }
+
     sprintf(element, "subgroup/%s/sigset/%s", subgroup, name);
 
-    fd = G_fopen_old_misc("group", element, group, G_mapset());
-    if (fd == NULL)
-	G_warning(_("Unable to open signature file <%s> for subgroup <%s> "
-		    "of group <%s@%s>"),
-		  name, subgroup, group, G_mapset());
+    fd = G_fopen_old_misc("group", element, group_name, G_mapset());
     
     return fd;
 }



More information about the grass-commit mailing list