# std.tar: add strip components error to diagnostics · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/035c1b65229083e01bc5ec69f2ad529ba0c56062)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 035c1b65229083e01bc5ec69f2ad529ba0c56062

Requested commit: 035c1b65229083e01bc5ec69f2ad529ba0c56062

Commit: 035c1b65229083e01bc5ec69f2ad529ba0c56062

Tree: b7e5ed6d5e6d2da7a8f19d68191ad748ff1bc83a

Author: Igor Anić

Committer: Andrew Kelley

## Message

```
std.tar: add strip components error to diagnostics

This was the only kind of error which was raised in pipeToFileSystem and
not added to Diagnostics.
Shell tar silently ignores paths which are stripped out when used with
`--strip-components` switch. This enables that same behavior, errors
will be collected in diagnostics but caller is free to ignore that type
of diagnostics errors.
Enables use case where caller knows structure of the tar file and want
to extract only some deeply nested folders ignoring upper files/folders.

Fixes: #17620 by giving caller options:
- not provide diagnostic and get errors
- provide diagnostics and analyze errors
- provide diagnostics and ignore errors

```

## Parents

- [fe66a12a23eda90b89b06dc28957f3baac01ee89](https://git.cafe/gitcafe/zig/commit/fe66a12a23eda90b89b06dc28957f3baac01ee89?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/035c1b65229083e01bc5ec69f2ad529ba0c56062?format=markdown)
