knut2
579e78f1ef
Update entry.rb
...
Add accessor to @internal_file_attributes
See http://stackoverflow.com/questions/39800771/hot-to-set-binary-flag-in-zip-file-with-rubyzip
2016-10-10 23:04:36 +02:00
Pavel Lobashov
73a35d4515
User `warn` method instead `STDERR.puts` to correctly check error in tests
...
See http://stackoverflow.com/questions/34351144/minitest-assert-output-incorrect-check-for-stderr
about this
2015-12-18 16:40:24 +03:00
Victor Costan
77acc03ddb
Fix exception due to calling empty? on nil.
2015-09-30 03:57:21 -04:00
Seth Kingsley
05a9ba3f20
Use duck typing to detect IO-like objects.
2015-09-03 06:16:32 -07:00
Pavel Lobashov
c0177a455b
Merge branch 'master' into rubocop_fixes
...
Conflicts:
README.md
samples/example_recursive.rb
2015-06-08 10:14:25 +03:00
Alexander Simonov
d289780072
Fix #234 . Add special variable what is a flag about internal usege
2015-06-07 17:29:54 +03:00
Vít Ondruch
32016ab1bf
Remove executable bit.
2015-03-31 13:15:46 +02:00
Pavel Lobashov
2007be0ab6
fix rubocop Lint/UselessAccessModifier cop
2015-03-24 19:47:49 +03:00
Pavel Lobashov
fd864bd7ab
fix rubocop Style/CaseEquality cop
2015-03-24 19:44:47 +03:00
Pavel Lobashov
b920a1eb49
fix rubocop Style/GuardClause cop
2015-03-24 19:16:03 +03:00
Pavel Lobashov
b9aefaffb5
fix rubocop Style/IfUnlessModifier cop
2015-03-24 19:09:22 +03:00
Pavel Lobashov
47b72f5cab
fix rubocop Style/LeadingCommentSpace cop
2015-03-23 19:06:01 +03:00
Pavel Lobashov
d5f79822c1
fix rubocop Style/LineEndConcatenation cop
2015-03-23 19:03:28 +03:00
Pavel.Lobashov
8d6f23ba9a
fix rubocop Style/SpaceAroundOperators cop
2015-03-22 20:03:50 +03:00
Pavel.Lobashov
b13fafb7e8
fix rubocop Style/StringLiterals cop
2015-03-22 19:54:44 +03:00
Pavel.Lobashov
73e5f70bdf
fix rubocop Style/SpaceAfterMethodName cop
2015-03-22 19:43:44 +03:00
Pavel.Lobashov
105c2c71b2
fix rubocop Style/RedundantException cop
2015-03-22 19:32:47 +03:00
Pavel.Lobashov
abf9cbec23
fix rubocop Style/RedundantSelf cop
2015-03-22 19:30:24 +03:00
Pavel.Lobashov
06e5a9352d
fix rubocop Style/ParenthesesAroundCondition cop
2015-03-22 19:25:35 +03:00
Pavel Lobashov
b730387cf2
redone fixes by rubocop Style/Alias to be in style of https://github.com/bbatsov/ruby-style-guide#alias-method-lexically
2015-03-21 13:14:21 +03:00
Pavel Lobashov
da863e4b55
Merge branch 'master' into rubocop_fixes
...
Conflicts:
lib/zip/entry.rb
2015-03-21 11:37:28 +03:00
Pavel Lobashov
b93ef1266f
fix rubocop Style/StringLiterals cop
2015-03-21 11:27:44 +03:00
Pavel Lobashov
b9a757e045
fix rubocop Style/EmptyLinesAroundClassBody cop
2015-03-21 11:21:26 +03:00
Pavel Lobashov
6c46c21abb
fix rubocop Style/ColonMethodCall cop
2015-03-21 11:16:06 +03:00
Pavel.Lobashov
bb08213cb7
fix rubocop Style/Alias cop
2015-03-20 23:17:05 +03:00
Pavel.Lobashov
4ee6d6be39
fix rubocop Lint/UnusedMethodArgument cop
2015-03-20 23:09:41 +03:00
Pavel.Lobashov
67838e13ac
fix rubocop Lint/EndAlignment cop
2015-03-20 23:00:20 +03:00
Pavel.Lobashov
6d19df491a
fix rubocop Lint/AssignmentInCondition cop
2015-03-20 22:57:38 +03:00
Pavel.Lobashov
d928aeebe5
make parse_zip64_extra check for empty @extra['Zip64'] easier to read
2015-03-20 22:54:28 +03:00
Pavel Lobashov
17ac4fdba1
Fix #218
...
Ouput Invalid Date/time to STDERR
2015-03-19 17:32:33 +03:00
Sergey Konotopov
b7fa9b124e
Fixing Zip#read_local_entry error on JRuby
2015-03-07 12:50:13 +03:00
Shigeaki Matsumura
85a7bbdf1a
add data descriptor for each entries when encrypto
2015-01-08 18:30:32 +09:00
lobashov
7498e8a9d3
add warn_invalid_date option
2014-12-01 18:39:29 +03:00
Nikolay Petrachkov
5a4d1ba52a
Use tr instead of gsub
2014-10-22 16:37:21 +02:00
Henry Yang
a7a11e33bd
NTFS Extra Field (0x000a) support
2014-09-11 23:04:23 -07:00
Mehmet Celik
b5c5b6803e
Zip::Entry::DEFLATED was forced on every file
2014-04-23 08:42:09 +02:00
mrloop
9eb35ca0c4
Don't send empty string to stream
...
Unneeded method call removed.
This was causing an issue in rails 4 and zipline
https://github.com/fringd/zipline/pull/10
2014-04-17 13:23:12 +01:00
Ian Young
37ed325783
Clean up tempfiles from output stream, fixes #57
2014-04-04 14:32:11 -07:00
Jeremy Stanley
9e144061b9
fix modifying existing zipfile with zip64 enabled
...
The local header size computed from the central directory entry
is incorrect due to the Zip64Placeholder in the local entry.
This caused us to seek to the wrong location when copying an
unchanged compressed data stream.
(The same problem could occur when modifying any zip file where
the local header and central directory header contain different
variable-sized fields, so it's a good idea not to trust the CD
to tell us the local header size in any case.)
2014-03-12 15:57:52 -06:00
Alexander Simonov
2697c7ea4f
Fix #138
2014-03-09 20:38:24 +02:00
Sam Rawlins
a37e13c6f0
File.exists? -> File.exist?
2014-02-06 15:00:38 -08:00
Alexander Simonov
ec81c30382
Fix for #126 and #127
2014-01-24 11:37:38 +02:00
Alexander Simonov
c7f0b17abf
Real fix for #119
2014-01-19 13:45:58 +02:00
Alexander Simonov
18506c6345
Fix #119 calling 'path' on not IO objects
2014-01-06 20:29:39 +02:00
Jeremy Stanley
af165f5cbd
Add read/write support for zip64 extensions
...
This commit adds the capability of creating archives larger than
4GB via zip64 extensions. It also fixes bugs reading archives of
this size (specifically, the 64-bit offset of the local file
header was not being read from the central directory entry).
To maximize compatibility, zip64 extensions are used only when
required. Unfortunately, at the time we write a local file header,
we don't know the size of the file and thus whether a Zip64
Extended Information Extra Field will be required. Therefore
this commit writes a 'placeholder' extra field to reserve space
for the zip64 entry, which will be written if necessary when
we update the local entry with the final sizes and CRC. I use
the signature "\x99\x99" for this field, following the example
of DotNetZip which does the same.
This commit also adds a rake task, zip64_full_test, which
fully tests zip64 by actually creating and verifying a 4GB zip
file. Please note, however, that this test requires UnZip
version 6.00 or newer, which may not be supplied by your OS.
This test doesn't run along with the main unit tests because
it takes a few minutes to complete.
2013-09-27 20:41:00 -06:00
Alexander Simonov
73d9e1c8a0
StingIO support #47 #18
2013-08-29 23:50:12 +03:00
Alexander Simonov
609de2ff48
Zip64 read-only support. Fix #81
2013-08-26 23:26:14 +03:00
Alexander Simonov
317fdd0d04
Add posibility to set Language encoding flag. Changed way to set settings.
2013-08-15 01:00:27 +03:00
Alexander Simonov
20d79feb99
Refactor ::Zip::Entry and ::Zip::ExtraField
2013-06-30 23:52:48 +03:00
Alexander Simonov
61ce5dbc5f
Refactoring part #2
...
Rubyzip interface was changed!
2013-06-03 10:56:24 +03:00