aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
authorJP Rosevear <jpr@novell.com>2005-01-06 23:02:48 +0800
committerJP Rosevear <jpr@src.gnome.org>2005-01-06 23:02:48 +0800
commit7627d2f868053a6d96abfa34dc00510a65ef492c (patch)
tree99a8d871e5b3ec897d9c4e3db2b291f12e0e47aa /e-util
parentb7c7fa51d6f12bf02871a65a4c6deffb3f559378 (diff)
downloadgsoc2013-evolution-7627d2f868053a6d96abfa34dc00510a65ef492c.tar
gsoc2013-evolution-7627d2f868053a6d96abfa34dc00510a65ef492c.tar.gz
gsoc2013-evolution-7627d2f868053a6d96abfa34dc00510a65ef492c.tar.bz2
gsoc2013-evolution-7627d2f868053a6d96abfa34dc00510a65ef492c.tar.lz
gsoc2013-evolution-7627d2f868053a6d96abfa34dc00510a65ef492c.tar.xz
gsoc2013-evolution-7627d2f868053a6d96abfa34dc00510a65ef492c.tar.zst
gsoc2013-evolution-7627d2f868053a6d96abfa34dc00510a65ef492c.zip
use the base name only, so if a full path is passed to us we still write
2005-01-06 JP Rosevear <jpr@novell.com> * e-error-tool.c (main): use the base name only, so if a full path is passed to us we still write out to the current directory, for when builddir != srcdir svn path=/trunk/; revision=28253
Diffstat (limited to 'e-util')
-rw-r--r--e-util/ChangeLog6
-rw-r--r--e-util/e-error-tool.c7
2 files changed, 11 insertions, 2 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog
index c9f1596fb6..e5e3340e14 100644
--- a/e-util/ChangeLog
+++ b/e-util/ChangeLog
@@ -1,3 +1,9 @@
+2005-01-06 JP Rosevear <jpr@novell.com>
+
+ * e-error-tool.c (main): use the base name only, so if a full path
+ is passed to us we still write out to the current directory, for
+ when builddir != srcdir
+
2005-01-04 Rodrigo Moya <rodrigo@novell.com>
* e-categories-config.[ch]: removed most of the API. The rest will
diff --git a/e-util/e-error-tool.c b/e-util/e-error-tool.c
index c6f1e0ff8c..4544b8b158 100644
--- a/e-util/e-error-tool.c
+++ b/e-util/e-error-tool.c
@@ -111,9 +111,12 @@ int main(int argc, char **argv)
FILE *out;
for (i=1;i<argc;i++) {
- char *name;
+ char *orig_name, *name;
- name = g_strdup_printf("%s.h", argv[i]);
+ orig_name = g_path_get_basename (argv[i]);
+ name = g_strdup_printf("%s.h", orig_name);
+ g_free (orig_name);
+
out = fopen(name, "w");
if (out == NULL) {
fprintf(stderr, "Error creating %s: %s\n", name, strerror(errno));