lib/zip/extra_field/old_unix.rb in rubyzip-2.2.0 vs lib/zip/extra_field/old_unix.rb in rubyzip-2.3.0
- old
+ new
@@ -14,17 +14,19 @@
attr_accessor :uid, :gid, :atime, :mtime
def merge(binstr)
return if binstr.empty?
+
size, content = initial_parse(binstr)
# size: 0 for central directory. 4 for local header
return if !size || size == 0
+
atime, mtime, uid, gid = content.unpack('VVvv')
@uid ||= uid
@gid ||= gid
@atime ||= atime
- @mtime ||= mtime
+ @mtime ||= mtime # rubocop:disable Naming/MemoizedInstanceVariableName
end
def ==(other)
@uid == other.uid &&
@gid == other.gid &&