Skip to content

Commit 9b09808

Browse files
committed
[MDEP-651] Warn on casing conflicts between archive entries and files on disk
1 parent 52a9a1f commit 9b09808

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/org/codehaus/plexus/archiver/AbstractUnArchiver.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -343,9 +343,10 @@ protected void extractFile( final File srcF, final File dir, final InputStream c
343343

344344
try
345345
{
346-
if ( f.exists() && ( f.lastModified() >= entryDate.getTime() ) )
346+
if ( f.exists() && !StringUtils.equalsIgnoreCase( entryName, canonicalDestPath ) )
347347
{
348-
String message = String.format( "Archive entry %s already exists on disk and is newer", entryName );
348+
String message = String.format( "Archive entry %s and existing file %s names differ only by case."
349+
+ " This may cause issues on case insensitive file systems.", entryName, canonicalDestPath );
349350
getLogger().warn( message );
350351
if ( !isOverwrite() ) {
351352
return;

0 commit comments

Comments
 (0)