mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-13 00:45:44 +01:00
Implement option to load rest of files completely
This commit is contained in:
@@ -115,10 +115,16 @@ public class ContentResource {
|
||||
}
|
||||
|
||||
private StreamingOutput createStreamingOutput(String namespace, String name, String revision, String path, Integer start, Integer end) {
|
||||
Integer effectiveEnd;
|
||||
if (end != null && end < 0) {
|
||||
effectiveEnd = null;
|
||||
} else {
|
||||
effectiveEnd = end;
|
||||
}
|
||||
return os -> {
|
||||
OutputStream sourceOut;
|
||||
if (start != null || end != null) {
|
||||
sourceOut = new LineFilteredOutputStream(os, start, end);
|
||||
if (start != null || effectiveEnd != null) {
|
||||
sourceOut = new LineFilteredOutputStream(os, start, effectiveEnd);
|
||||
} else {
|
||||
sourceOut = os;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user