* src/common.h (transform_symlinks_option): New global.

* src/create.c (dump_file0): Transform symlink targets only if
explicitly required.  Thanks Cyril Strejc for reporting the
problem.
* src/tar.c (parse_opt): New options --transform-symlinks and
--no-transform-symlinks. New alias --xform to the --transform
option.
* doc/tar.texi: Document --transform-symlinks
* NEWS: Update.
* THANKS: Update.

* src/names.c (name_gather): Use xzalloc.
* src/buffer.c (short_read): Move record size detection before
the loop.
This commit is contained in:
Sergey Poznyakoff
2008-10-16 11:07:19 +00:00
parent 7b69ee5a24
commit 57bfbbde90
10 changed files with 134 additions and 25 deletions

View File

@@ -686,6 +686,18 @@ short_read (size_t status)
more = record_start->buffer + status;
left = record_size - status;
if (left && left % BLOCKSIZE == 0
&& !read_full_records && verbose_option > 1
&& record_start_block == 0 && status != 0)
{
unsigned long rsize = status / BLOCKSIZE;
WARN ((0, 0,
ngettext ("Record size = %lu block",
"Record size = %lu blocks",
rsize),
rsize));
}
while (left % BLOCKSIZE != 0
|| (left && status && read_full_records))
{
@@ -707,26 +719,10 @@ short_read (size_t status)
rest));
}
/* User warned us about this. Fix up. */
left -= status;
more += status;
}
/* FIXME: for size=0, multi-volume support. On the first record, warn
about the problem. */
if (!read_full_records && verbose_option > 1
&& record_start_block == 0 && status != 0)
{
unsigned long rsize = (record_size - left) / BLOCKSIZE;
WARN ((0, 0,
ngettext ("Record size = %lu block",
"Record size = %lu blocks",
rsize),
rsize));
}
record_end = record_start + (record_size - left) / BLOCKSIZE;
records_read++;
}