poise-archive 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/poise_archive/archive_providers/tar.rb +16 -7
- data/lib/poise_archive/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 91ccb73c49f6703d1836d4ea834300556e636022
|
4
|
+
data.tar.gz: 98c56241ab537943ca0a6e4b5e0c7490a0fb5fdf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3a403715a2874abda4d9382226b234dcacafb93799cdf5ff69b2b4a6c0e788134301fd9c4c51370462cc64a6441d4cfe91bdcbebdf7ba3844b72202ad47ebb7
|
7
|
+
data.tar.gz: 1cf28ee3de172108eebaf3e9f408c8245e846d8f2c98dac4da3c26894d24d1f5e6dc69c50bef2404871360783322635e5ba55a2e5051bfaee045d5efa83c3ba6
|
data/CHANGELOG.md
CHANGED
@@ -47,14 +47,23 @@ module PoiseArchive
|
|
47
47
|
#
|
48
48
|
# @return [void]
|
49
49
|
def unpack_tar
|
50
|
+
entry_name = nil
|
50
51
|
tar_each do |entry|
|
51
|
-
|
52
|
-
entry.
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
52
|
+
if entry.full_name == TAR_LONGLINK
|
53
|
+
# Stash the longlink name so it will be used for the next entry.
|
54
|
+
entry_name = entry.read.strip
|
55
|
+
# And then skip forward because this isn't a real block.
|
56
|
+
next
|
57
|
+
end
|
58
|
+
# For entries not preceded by a longlink block, use the normal name.
|
59
|
+
entry_name ||= entry.full_name
|
60
|
+
# Process strip_components by mangling the name.
|
61
|
+
parsed_name = entry_name.split(/\//).drop(new_resource.strip_components).join('/')
|
62
|
+
# Reset entry_name for the next entry.
|
63
|
+
entry_name = nil
|
64
|
+
# If strip_components wiped out the name, don't process this entry.
|
65
|
+
next if parsed_name.empty?
|
66
|
+
dest = ::File.join(new_resource.destination, parsed_name)
|
58
67
|
if entry.directory?
|
59
68
|
Dir.mkdir(dest, entry.header.mode)
|
60
69
|
elsif entry.file?
|