Skip to content

Commit a6c16de

Browse files
committed
[PLXCOMP-178] Last modified time preservation
Patch by David Tombs, applied unmodified
1 parent e45b389 commit a6c16de

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/org/codehaus/plexus/archiver/dir/DirectoryArchiver.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,6 @@ protected void copyFile( final ArchiveEntry entry, final String vPath )
119119
return;
120120
}
121121

122-
outFile.setLastModified( inLastModified == PlexusIoResource.UNKNOWN_MODIFICATION_DATE ? System.currentTimeMillis()
123-
: inLastModified );
124-
125122
if ( !in.isDirectory() )
126123
{
127124
if ( !outFile.getParentFile().exists() )
@@ -158,6 +155,9 @@ else if ( !outFile.mkdirs() )
158155
throw new ArchiverException( "Unable to create directory or parent directory of " + outFile );
159156
}
160157
}
158+
159+
outFile.setLastModified( inLastModified == PlexusIoResource.UNKNOWN_MODIFICATION_DATE ? System.currentTimeMillis()
160+
: inLastModified );
161161
}
162162

163163
protected void cleanUp()

0 commit comments

Comments
 (0)