@@ -24,7 +24,7 @@ public final class SentryFileOutputStream extends FileOutputStream {
24
24
private final @ NotNull FileIOSpanManager spanManager ;
25
25
26
26
public SentryFileOutputStream (final @ Nullable String name ) throws FileNotFoundException {
27
- this (name != null ? new File (name ) : null , HubAdapter .getInstance ());
27
+ this (name != null ? new File (name ) : null , false , HubAdapter .getInstance ());
28
28
}
29
29
30
30
public SentryFileOutputStream (final @ Nullable String name , final boolean append )
@@ -33,7 +33,7 @@ public SentryFileOutputStream(final @Nullable String name, final boolean append)
33
33
}
34
34
35
35
public SentryFileOutputStream (final @ Nullable File file ) throws FileNotFoundException {
36
- this (file , HubAdapter .getInstance ());
36
+ this (file , false , HubAdapter .getInstance ());
37
37
}
38
38
39
39
public SentryFileOutputStream (final @ Nullable File file , final boolean append )
@@ -45,9 +45,9 @@ public SentryFileOutputStream(final @NotNull FileDescriptor fdObj) {
45
45
this (init (fdObj , null , HubAdapter .getInstance ()), fdObj );
46
46
}
47
47
48
- SentryFileOutputStream (final @ Nullable File file , final @ NotNull IHub hub )
48
+ SentryFileOutputStream (final @ Nullable File file , final boolean append , final @ NotNull IHub hub )
49
49
throws FileNotFoundException {
50
- this (init (file , false , null , hub ));
50
+ this (init (file , append , null , hub ));
51
51
}
52
52
53
53
private SentryFileOutputStream (
@@ -72,7 +72,7 @@ private static FileOutputStreamInitData init(
72
72
throws FileNotFoundException {
73
73
final ISpan span = FileIOSpanManager .startSpan (hub , "file.write" );
74
74
if (delegate == null ) {
75
- delegate = new FileOutputStream (file );
75
+ delegate = new FileOutputStream (file , append );
76
76
}
77
77
return new FileOutputStreamInitData (
78
78
file , append , span , delegate , hub .getOptions ().isSendDefaultPii ());
0 commit comments