Sfoglia il codice sorgente

temporal library: Ignore the warning of missing mapset ownership (trunk, https://trac.osgeo.org/grass/changeset/66554)

git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@66671 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Neteler 9 anni fa
parent
commit
d0f75a8bd5
1 ha cambiato i file con 6 aggiunte e 2 eliminazioni
  1. 6 2
      lib/temporal/lib/connect.c

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

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