Skip to content

Commit

Permalink
Updated for Crystal V0.34.0
Browse files Browse the repository at this point in the history
  • Loading branch information
naqvis committed Apr 8, 2020
1 parent fac5122 commit 62c85df
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
4 changes: 2 additions & 2 deletions shard.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: crystar
version: 0.1.4
version: 0.1.5
description: |
Shard Crystar implements access to tar archives. This shard aims to cover most variations of the format, including those produced by GNU and BSD tar tools.
authors:
- Ali Naqvi <syed.alinaqvi@gmail.com>

crystal: 0.33.0
crystal: 0.34.0

license: MIT
2 changes: 1 addition & 1 deletion src/crystar.cr
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ require "./tar/*"
# end
# ```
module Crystar
VERSION = "0.1.0"
VERSION = "0.1.5"

# Common Crystar exceptions
class Error < Exception
Expand Down
4 changes: 4 additions & 0 deletions src/tar/header.cr
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,8 @@ module Crystar
raise Error.new("only PAXRecords should be set for XGlobalHeader") if self == h2
why_only_pax = "only PAX supports XGlobalHeader"
format = format.may_only_be(Format::PAX)
else
#
end

raise Error.new("negative size on header-only type") if !Crystar.header_only_type?(flag) && size < 0
Expand Down Expand Up @@ -534,6 +536,8 @@ module Crystar
h.mode |= ISGID
when .sticky?
h.mode |= ISVTX
else
#
end
h
end
Expand Down
4 changes: 4 additions & 0 deletions src/tar/reader.cr
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ module Crystar
gnu_long_name = p.parse_string(realname)
when GNU_LONGLINK
gnu_long_link = p.parse_string(realname)
else
#
end
next # This is meta header affecting the next header
else
Expand Down Expand Up @@ -245,6 +247,8 @@ module Crystar
end
hdr.format = Format::None # Bugyy file is not GNU
end
else
# We don't need to do anything
end
hdr.name = "#{prefix}/#{hdr.name}" if prefix.size > 0
end
Expand Down

0 comments on commit 62c85df

Please sign in to comment.