[GRASS-SVN] r57613 - grass/branches/releasebranch_6_4/display/d.profile
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Sep 7 04:25:57 PDT 2013
Author: hamish
Date: 2013-09-07 04:25:57 -0700 (Sat, 07 Sep 2013)
New Revision: 57613
Modified:
grass/branches/releasebranch_6_4/display/d.profile/Range.c
Log:
close file once done with it (#1323), quote path (merge r55840 from devbr6)
Modified: grass/branches/releasebranch_6_4/display/d.profile/Range.c
===================================================================
--- grass/branches/releasebranch_6_4/display/d.profile/Range.c 2013-09-07 11:22:44 UTC (rev 57612)
+++ grass/branches/releasebranch_6_4/display/d.profile/Range.c 2013-09-07 11:25:57 UTC (rev 57613)
@@ -16,7 +16,8 @@
/* write stats to a temp file */
temp_fname = G_tempfile();
- sprintf(stats_cmd, "r.stats -ci %s > %s\n", name, temp_fname);
+ sprintf(stats_cmd, "r.stats -ci \"%s\" > \"%s\"", name, temp_fname);
+ G_debug(3, "r.stats command=[%s]", stats_cmd);
system(stats_cmd);
/* open temp file and read the stats into a linked list */
@@ -45,6 +46,7 @@
done = 1;
}
+ fclose(temp_file);
return 0;
}
More information about the grass-commit
mailing list