Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

muntar skips empty files and directories, and is loose with tar entry "type" #259

Closed
papertigers opened this issue Jun 23, 2016 · 2 comments

Comments

@papertigers
Copy link

It seems muntar currently doesn't create empty directories on the manta side even though tar(1) itself supports it.

example $ ls
tar1.tar

example $ tar tf tar1.tar
emptydir/
subdir1/
subdir1/test.txt
test.txt

example $ muntar -f tar1.tar ~~/public
/mikezeller/public/subdir1/test.txt
/mikezeller/public/test.txt

example $ minfo /mikezeller/public/emptydir
HTTP/1.1 404 Not Found
content-type: application/json
content-length: 81
content-md5: CbfsD8KXyQ9jOJC6lXjMLA==
date: Thu, 23 Jun 2016 21:30:12 GMT
server: Manta
x-request-id: d9b59f7f-2dfa-4ea2-9c10-802f087a6aff
x-response-time: 16
x-server-name: a28d054b-d8e0-40ab-befc-e5728ef85650
connection: keep-alive

example $ tar xf tar1.tar
example $ ls
emptydir    subdir1     tar1.tar    test.txt
@trentm trentm changed the title muntar skips empty directories muntar skips empty files and directories, and is loose with tar entry "type" Jun 23, 2016
@trentm
Copy link
Contributor

trentm commented Jun 23, 2016

An example tar entry.props from node-tar:

entry.props: { path: 'tmp/c/',
  mode: 493,
  uid: 501,
  gid: 20,
  size: 0,
  mtime: Thu Jun 23 2016 14:27:15 GMT-0700 (PDT),
  cksum: 5485,
  type: '5',
  linkpath: '',
  ustar: 'ustar\u0000',
  ustarver: '00',
  uname: 'trentm',
  gname: 'staff',
  devmaj: 0,
  devmin: 0,
  fill: '' }

The type indicates this is a dir. There are other types that should likely be considered here. See: https://en.wikipedia.org/wiki/Tar_(computing)

E.g. do what on "vendor extensions" values for "type"? Either error (likely the preferred default) or possibly offer an option to ignore entries of unknown type.

@bahamat
Copy link
Member

bahamat commented Sep 16, 2023

As of #396, muntar is deprecated and will be removed in a future release.

@bahamat bahamat closed this as completed Sep 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants