diff --git a/filemin/filemin-lib.pl b/filemin/filemin-lib.pl index b2169fb28..1dbadeae8 100644 --- a/filemin/filemin-lib.pl +++ b/filemin/filemin-lib.pl @@ -487,7 +487,7 @@ foreach my $fref (@{$files_to_extract}) { my $name = $fref->{'file'}; my $extract_to = "$cwd/" . fileparse("$cwd/$name", qr/\.[^.]*/); - if (-e $extract_to) { + if (-e $extract_to && !$in{'overwrite_existing'}) { $extract_to .= "_" . int(rand(1000)) . $$; } mkdir($extract_to); diff --git a/filemin/lang/en b/filemin/lang/en index 958c07c4b..0b681ac92 100644 --- a/filemin/lang/en +++ b/filemin/lang/en @@ -166,3 +166,4 @@ index_return=file listing upload_dirs=Directory Upload extract_uploaded=Extract Compressed extract_cmd_not_avail=Could not extract $1 file as $2 command is missing +overwrite_existing=Overwrite Existing diff --git a/filemin/unauthenticated/templates/dialogs.html b/filemin/unauthenticated/templates/dialogs.html index d086d0618..c8d1986eb 100644 --- a/filemin/unauthenticated/templates/dialogs.html +++ b/filemin/unauthenticated/templates/dialogs.html @@ -337,6 +337,7 @@ $text{'upload_dirs'} $text{'extract_uploaded'} + $text{'overwrite_existing'}