diff options
Diffstat (limited to 'e-util')
-rw-r--r-- | e-util/ChangeLog | 6 | ||||
-rw-r--r-- | e-util/e-error-tool.c | 7 |
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)); |