diff --git a/src/main.c b/src/main.c index 8f38b1c6..6feb1403 100644 --- a/src/main.c +++ b/src/main.c @@ -1034,7 +1034,7 @@ main (int argc, char **argv) /* On VMS, lose the "dev:[dir]" prefix and the ".EXE;nnn" suffix. */ exec_name = vms_basename (argv[0]); #else /* def __VMS */ - exec_name = basename (argv[0]); + exec_name = base_name (argv[0]); #endif /* def __VMS [else] */ #ifdef WINDOWS diff --git a/src/warc.c b/src/warc.c index f23d381c..5ae21a51 100644 --- a/src/warc.c +++ b/src/warc.c @@ -684,7 +684,7 @@ warc_write_warcinfo_record (char *filename) warc_timestamp (timestamp, sizeof(timestamp)); - filename_basename = basename (filename); + filename_basename = base_name (filename); warc_write_start_record (); warc_write_header ("WARC-Type", "warcinfo"); @@ -693,6 +693,8 @@ warc_write_warcinfo_record (char *filename) warc_write_header ("WARC-Record-ID", warc_current_warcinfo_uuid_str); warc_write_header ("WARC-Filename", filename_basename); + xfree (filename_basename); + /* Create content. */ warc_tmp = warc_tempfile (); if (warc_tmp == NULL)