An error occurred fetching the project authors.
  1. 29 Nov, 2017 2 commits
  2. 16 Nov, 2017 1 commit
  3. 15 Nov, 2017 1 commit
  4. 06 Nov, 2017 2 commits
    • Joe Tsai's avatar
      archive/zip: add FileHeader.NonUTF8 field · 4fcc8359
      Joe Tsai authored
      The NonUTF8 field provides users with a way to explictly tell the
      ZIP writer to avoid setting the UTF-8 flag.
      This is necessary because many readers:
      	1) (Still) do not support UTF-8
      	2) And use the local system encoding instead
      
      Thus, even though character encodings other than CP-437 and UTF-8
      are not officially supported by the ZIP specification, pragmatically
      the world has permitted use of them.
      
      When a non-standard encoding is used, it is the user's responsibility
      to ensure that the target system is expecting the encoding used
      (e.g., producing a ZIP file you know is used on a Chinese version of Windows).
      
      We adjust the detectUTF8 function to account for Shift-JIS and EUC-KR
      not being identical to ASCII for two characters.
      
      We don't need an API for users to explicitly specify that they are encoding
      with UTF-8 since all single byte characters are compatible with all other
      common encodings (Windows-1256, Windows-1252, Windows-1251, Windows-1250,
      IEC-8859, EUC-KR, KOI8-R, Latin-1, Shift-JIS, GB-2312, GBK) except for
      the non-printable characters and the backslash character (all of which
      are invalid characters in a path name anyways).
      
      Fixes #10741
      
      Change-Id: I9004542d1d522c9137973f1b6e2b623fa54dfd66
      Reviewed-on: https://go-review.googlesource.com/75592
      Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      4fcc8359
    • Joe Tsai's avatar
      archive/zip: add FileHeader.Modified field · 6e8894d5
      Joe Tsai authored
      The ModifiedTime and ModifiedDate fields are not expressive enough
      for many of the time extensions that have since been added to ZIP,
      nor are they easy to access since they in a legacy MS-DOS format,
      and must be set and retrieved via the SetModTime and ModTime methods.
      
      Instead, we add new field Modified of time.Time type that contains
      all of the previous information and more.
      
      Support for extended timestamps have been attempted before, but the
      change was reverted because it provided no ability for the user to
      specify the timezone of the legacy MS-DOS fields.
      Technically the old API did not either, but users were manually offsetting
      the timestamp to achieve the same effect.
      
      The Writer now writes the legacy timestamps according to the timezone
      of the FileHeader.Modified field. When the Modified field is set via
      the SetModTime method, it is in UTC, which preserves the old behavior.
      
      The Reader attempts to determine the timezone if both the legacy
      and extended timestamps are present since it can compute the delta
      between the two values.
      
      Since Modified is a superset of the information in ModifiedTime and ModifiedDate,
      we mark ModifiedTime, ModifiedDate, ModTime, and SetModTime as deprecated.
      
      Fixes #18359
      
      Change-Id: I29c6bc0a62908095d02740df3e6902f50d3152f1
      Reviewed-on: https://go-review.googlesource.com/74970
      Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      6e8894d5
  5. 25 Oct, 2017 1 commit
    • Joe Tsai's avatar
      archive/zip: restrict UTF-8 detection for comment and name fields · 78805c07
      Joe Tsai authored
      CL 39570 added support for automatically setting flag bit 11 to
      indicate that the filename and comment fields are encoded in UTF-8,
      which is (conventionally) the encoding using for most Go strings.
      
      However, the detection added is too lose for two reasons:
      * We need to ensure both fields are at least possibly UTF-8.
      That is, if any field is definitely not UTF-8, then we can't set the bit.
      * The utf8.ValidRune returns true for utf8.RuneError, which iterating
      over a Go string automatically returns for invalid UTF-8.
      Thus, we manually check for that value.
      
      Updates #22367
      Updates #10741
      
      Change-Id: Ie8aae388432e546e44c6bebd06a00434373ca99e
      Reviewed-on: https://go-review.googlesource.com/72791Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      78805c07
  6. 31 Aug, 2017 1 commit
  7. 13 Aug, 2017 1 commit
  8. 15 Jul, 2017 1 commit
  9. 26 May, 2017 1 commit
  10. 20 Dec, 2016 1 commit
    • Joe Tsai's avatar
      Revert: "archive/zip: handle mtime in NTFS/UNIX/ExtendedTS extra fields" · 5df59a4f
      Joe Tsai authored
      This change reverts the following CLs:
      	CL/18274: handle mtime in NTFS/UNIX/ExtendedTS extra fields
      	CL/30811: only use Extended Timestamp on non-zero MS-DOS timestamps
      
      We are reverting support for extended timestamps since the support was not
      not complete. CL/18274 added full support for reading extended timestamp fields
      and minimal support for writing them. CL/18274 is incomplete because it made
      no changes to the FileHeader struct, so timezone information was lost when
      reading and/or writing.
      
      While CL/18274 was a step in the right direction, we should provide full
      support for high precision timestamps in both the reader and writer.
      This will probably require that we add a new field of type time.Time.
      The complete fix is too involved to add in the time remaining for Go 1.8
      and will be completed in Go 1.9.
      
      Updates #10242
      Updates #17403
      Updates #18359
      Fixes #18378
      
      Change-Id: Icf6d028047f69379f7979a29bfcb319a02f4783e
      Reviewed-on: https://go-review.googlesource.com/34651
      Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      5df59a4f
  11. 17 Nov, 2016 1 commit
  12. 11 Oct, 2016 1 commit
  13. 06 Oct, 2016 1 commit
  14. 21 Feb, 2016 1 commit
  15. 07 Jan, 2016 1 commit
    • Russ Cox's avatar
      archive/zip: fix reading, writing of zip64 archives · 4aedbf5b
      Russ Cox authored
      Read zip files that contain only 64-bit header offset, not 64-bit sizes.
      Fixes #13367.
      
      Read zip files that contain completely unexpected Extra fields,
      provided we do not need to find 64-bit size or header offset information there.
      Fixes #13166.
      
      Write zip file entries with 0xFFFFFFFF uncompressed data bytes
      correctly (must use zip64 header, since that's the magic indicator).
      Fixes new TestZip64EdgeCase. (Noticed while working on the CL.)
      
      Change-Id: I84a22b3995fafab8052b99de8094a9f35a25de5b
      Reviewed-on: https://go-review.googlesource.com/18317Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      4aedbf5b
  16. 01 Dec, 2015 1 commit
  17. 10 Jun, 2015 1 commit
  18. 12 Mar, 2015 2 commits
  19. 26 Feb, 2015 1 commit
  20. 08 Sep, 2014 1 commit
  21. 01 Sep, 2014 1 commit
  22. 06 Aug, 2013 1 commit
  23. 17 Apr, 2013 1 commit
  24. 30 Oct, 2012 1 commit
  25. 22 Aug, 2012 1 commit
  26. 09 Mar, 2012 1 commit
  27. 27 Feb, 2012 3 commits
  28. 13 Feb, 2012 1 commit
  29. 10 Feb, 2012 1 commit
  30. 08 Feb, 2012 1 commit
  31. 24 Jan, 2012 1 commit
  32. 02 Nov, 2011 1 commit
  33. 25 Sep, 2011 1 commit
  34. 10 Jul, 2011 1 commit