]> Dogcows Code - chaz/tar/commitdiff
Call last_component instead of base_name. The latter returns a malloced string since...
authorSergey Poznyakoff <gray@gnu.org.ua>
Tue, 31 Oct 2006 20:18:50 +0000 (20:18 +0000)
committerSergey Poznyakoff <gray@gnu.org.ua>
Tue, 31 Oct 2006 20:18:50 +0000 (20:18 +0000)
src/extract.c
src/xheader.c

index 0ff01a998bc7df954817dd52cd1b72835f94a90d..148fdfca02933d288e5469e96aba7edfe2f8e4f4 100644 (file)
@@ -871,7 +871,7 @@ create_placeholder_file (char *file_name, bool is_symlink, int *interdir_made)
       if (h && ! h->after_links
          && strncmp (file_name, h->file_name, h->file_name_len) == 0
          && ISSLASH (file_name[h->file_name_len])
-         && (base_name (file_name) == file_name + h->file_name_len + 1))
+         && (last_component (file_name) == file_name + h->file_name_len + 1))
        {
          do
            {
index 2948859ab076180a69f36807dca282d841409d05..5676dcabfb5ee11c933b2e73260eb4b7d47be841 100644 (file)
@@ -264,7 +264,7 @@ xheader_format_name (struct tar_stat_info *st, const char *fmt, size_t n)
        case 'f':
          if (st)
            {
-             base = base_name (st->orig_file_name);
+             base = last_component (st->orig_file_name);
              len += strlen (base) - 2;
            }
          break;
This page took 0.024655 seconds and 4 git commands to generate.