Skip to content

Commit

Permalink
#473 set lastModifiedFileTime to 0 if negative value is passed
Browse files Browse the repository at this point in the history
  • Loading branch information
srikanth-lingala committed Sep 7, 2022
1 parent 7a74670 commit 3eb5867
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/net/lingala/zip4j/model/ZipParameters.java
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,8 @@ public long getLastModifiedFileTime() {
* @param lastModifiedFileTime the last modified time in milliseconds since the epoch
*/
public void setLastModifiedFileTime(long lastModifiedFileTime) {
if (lastModifiedFileTime <= 0) {
if (lastModifiedFileTime < 0) {
this.lastModifiedFileTime = 0;
return;
}

Expand Down

0 comments on commit 3eb5867

Please sign in to comment.