Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<groupId>org.cobbzilla</groupId>
<artifactId>s3s3mirror</artifactId>
<version>2.1.5-SNAPSHOT</version>
<version>2.1.6-SNAPSHOT</version>
<packaging>jar</packaging>

<licenses>
Expand Down
2 changes: 1 addition & 1 deletion s3s3mirror.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@echo off
java -Ds3s3mirror.version=2.1.5 -jar target/s3s3mirror-2.1.4-SNAPSHOT.jar %*
java -Ds3s3mirror.version=2.1.6 -jar target/s3s3mirror-2.1.4-SNAPSHOT.jar %*
2 changes: 1 addition & 1 deletion s3s3mirror.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

THISDIR=$(cd "$(dirname $0)" && pwd)

VERSION=2.1.5
VERSION=2.1.6
JARFILE="${THISDIR}/target/s3s3mirror-${VERSION}-SNAPSHOT.jar"
VERSION_ARG="-Ds3s3mirror.version=${VERSION}"

Expand Down
8 changes: 6 additions & 2 deletions src/main/java/org/cobbzilla/s3s3mirror/KeyDeleteJob.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,13 @@ public KeyDeleteJob(AmazonS3Client client, MirrorContext context, FileSummary su

final MirrorOptions options = context.getOptions();
keysrc = summary.getKey(); // NOTE: summary.getKey is the key in the destination bucket
if (options.hasPrefix()) {

if (options.hasDestPrefix()) {
keysrc = keysrc.substring(options.getDestPrefixLength());
keysrc = options.getPrefix() + keyDestination;
}

if (options.hasPrefix()) {
keysrc = options.getPrefix() + keysrc;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public S3DeleteMaster(MirrorContext context, BlockingQueue<Runnable> workQueue,
}

@Override protected String getPrefix(MirrorOptions options) {
return options.hasDestPrefix() ? options.getDestPrefix() : options.getPrefix();
return options.hasDestPrefix() ? options.getDestPrefix() : "";
}

@Override protected String getBucket(MirrorOptions options) { return options.getDestinationBucket(); }
Expand Down