Index: third_party/zlib/google/zip_reader.h |
diff --git a/third_party/zlib/google/zip_reader.h b/third_party/zlib/google/zip_reader.h |
index a1f470421525197a68b04bc3bd10a2d8257f467c..a3e1ee82080c17a19351bd6c6b11e2d0710b4158 100644 |
--- a/third_party/zlib/google/zip_reader.h |
+++ b/third_party/zlib/google/zip_reader.h |
@@ -57,7 +57,15 @@ class ZipReader { |
// Returns 0 if the entry is a directory. |
int64 original_size() const { return original_size_; } |
- // Returns the last modified time. |
+ // Returns the last modified time. If the time stored in the zip file was |
+ // not valid, the unix epoch will be returned. |
+ // |
+ // The time stored in the zip archive uses the MS-DOS date and time format. |
+ // http://msdn.microsoft.com/en-us/library/ms724247(v=vs.85).aspx |
+ // As such the following limitations apply: |
+ // * only years from 1980 to 2107 can be represented. |
+ // * the time stamp has a 2 second resolution. |
+ // * there's no timezone information, so the time is interpreted as local. |
base::Time last_modified() const { return last_modified_; } |
// Returns true if the entry is a directory. |
@@ -127,7 +135,8 @@ class ZipReader { |
// instead. Returns true on success. OpenCurrentEntryInZip() must be |
// called beforehand. |
// |
- // This function does not preserve the timestamp of the original entry. |
+ // This function preserves the timestamp of the original entry. If that |
+ // timestamp is not valid, the timestamp will be set to the current time. |
bool ExtractCurrentEntryToFilePath(const base::FilePath& output_file_path); |
// Extracts the current entry to the given output directory path using |
@@ -138,6 +147,9 @@ class ZipReader { |
// |
// Returns true on success. OpenCurrentEntryInZip() must be called |
// beforehand. |
+ // |
+ // This function preserves the timestamp of the original entry. If that |
+ // timestamp is not valid, the timestamp will be set to the current time. |
bool ExtractCurrentEntryIntoDirectory( |
const base::FilePath& output_directory_path); |