Jelajahi Sumber

temporal library: Ignore the warning of missing mapset ownership

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@66554 15284696-431f-4ddb-bdfa-cd5b030d7da7
Soeren Gebbert 9 tahun lalu
induk
melakukan
ee8a525785
1 mengubah file dengan 5 tambahan dan 2 penghapusan
  1. 5 2
      lib/temporal/lib/connect.c

+ 5 - 2
lib/temporal/lib/connect.c

@@ -99,13 +99,16 @@ static char *get_mapset_connection_name(const char *mapset, int contype)
     ret = G_mapset_permissions2(gisdbase, location, mapset);
     ret = G_mapset_permissions2(gisdbase, location, mapset);
     switch (ret) {
     switch (ret) {
     case 0: /* Check if the mapset exists and user is owner */
     case 0: /* Check if the mapset exists and user is owner */
-        G_warning(_("You don't have permission to access the mapset <%s>"),
+        /* We usppress this warning, since G_mapset_permission does not
+         * check the access privilegs to the mapset of a stranger.
+        G_warning(_("You are not the owner of mapset <%s>"),
                       mapset);
                       mapset);
+        */
         break;
         break;
     case -1:
     case -1:
         G_warning(_("Mapset <%s> does not exist."),
         G_warning(_("Mapset <%s> does not exist."),
 	              mapset);
 	              mapset);
-        break;
+        return ret_val;
     default:
     default:
         break;
         break;
     }    
     }