diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/FileSystemRepository.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/FileSystemRepository.java index bb2da2f224..38d53ea700 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/FileSystemRepository.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/FileSystemRepository.java @@ -1977,7 +1977,7 @@ public class FileSystemRepository implements ContentRepository { @Override public synchronized ContentClaim newContentClaim() throws IOException { - scc = new StandardContentClaim(scc.getResourceClaim(), scc.getOffset() + scc.getLength()); + scc = new StandardContentClaim(scc.getResourceClaim(), scc.getOffset() + Math.max(0, scc.getLength())); initialLength = 0; bytesWritten = 0L; incrementClaimaintCount(scc);