Browse Source

d.mon: fix https://trac.osgeo.org/grass/changeset/68983

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@69007 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 9 years ago
parent
commit
7f437e39f3
1 changed files with 1 additions and 2 deletions
  1. 1 2
      display/d.mon/start.c

+ 1 - 2
display/d.mon/start.c

@@ -63,8 +63,7 @@ char *start(const char *name, const char *output, int width, int height, int upd
         output_name = output;
         output_name = output;
         /* check write permission */
         /* check write permission */
         dir_name = G_store(output_name);
         dir_name = G_store(output_name);
-        dirname(dir_name);
-        if (access(dir_name, W_OK) != 0)
+        if (access(dirname(dir_name), W_OK) != 0)
             G_fatal_error(_("Unable to start monitor, don't have "
             G_fatal_error(_("Unable to start monitor, don't have "
                             "write permission for <%s>"), output_name);
                             "write permission for <%s>"), output_name);
         G_free(dir_name);
         G_free(dir_name);