Skip file or archive member if its transformed name is empty.
* NEWS: Document changes. * doc/tar.texi: Document changes. * src/common.h (transform_stat_info): Change return value. (transform_name_fp): Change signature. (WARN_EMPTY_TRANSFORM): New constant. * src/create.c: Check return from transform_name. Skip file, if it is false. * src/list.c (transform_stat_info): Return bool. (read_and): Skip member if transform_stat_info returns false. * src/transform.c (_transform_name_to_obstack): Change return type. Always allocate result in obstack. (transform_name_fp): Change arguments. Return true on success (transformed string not empty). Otherwise return false and don't change the source string. * src/warning.c: New warning class: empty-transform. * tests/extrac17.at: Use --warning=empty-transform.
This commit is contained in:
11
NEWS
11
NEWS
@@ -1,4 +1,4 @@
|
||||
GNU tar NEWS - User visible changes. 2024-11-02
|
||||
GNU tar NEWS - User visible changes. 2025-05-06
|
||||
Please send GNU tar bug reports to <bug-tar@gnu.org>
|
||||
|
||||
version TBD
|
||||
@@ -24,6 +24,15 @@ as argument to --mtime option (see GNU tar manual, chapter 4
|
||||
Defines output format for the COMMAND set by the above option. If
|
||||
used, command output will be parsed using strptime(3).
|
||||
|
||||
* Skip file or archive member if transformed name is empty
|
||||
|
||||
If applying file name transformations (--transform and
|
||||
--strip-component options) to a file or member name results in an
|
||||
empty string that file or member is skipped and a warning is printed.
|
||||
|
||||
The warning can be suppressed using the --warning=empty-transform
|
||||
option.
|
||||
|
||||
* Bug fixes
|
||||
|
||||
** Fixed O(n^2) time complexity bug for large numbers of directories when
|
||||
|
||||
Reference in New Issue
Block a user