@@ -24,7 +24,7 @@ public final class SentryFileOutputStream extends FileOutputStream {
2424 private final @ NotNull FileIOSpanManager spanManager ;
2525
2626 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 ());
2828 }
2929
3030 public SentryFileOutputStream (final @ Nullable String name , final boolean append )
@@ -33,7 +33,7 @@ public SentryFileOutputStream(final @Nullable String name, final boolean append)
3333 }
3434
3535 public SentryFileOutputStream (final @ Nullable File file ) throws FileNotFoundException {
36- this (file , HubAdapter .getInstance ());
36+ this (file , false , HubAdapter .getInstance ());
3737 }
3838
3939 public SentryFileOutputStream (final @ Nullable File file , final boolean append )
@@ -45,9 +45,9 @@ public SentryFileOutputStream(final @NotNull FileDescriptor fdObj) {
4545 this (init (fdObj , null , HubAdapter .getInstance ()), fdObj );
4646 }
4747
48- SentryFileOutputStream (final @ Nullable File file , final @ NotNull IHub hub )
48+ SentryFileOutputStream (final @ Nullable File file , final boolean append , final @ NotNull IHub hub )
4949 throws FileNotFoundException {
50- this (init (file , false , null , hub ));
50+ this (init (file , append , null , hub ));
5151 }
5252
5353 private SentryFileOutputStream (
@@ -72,7 +72,7 @@ private static FileOutputStreamInitData init(
7272 throws FileNotFoundException {
7373 final ISpan span = FileIOSpanManager .startSpan (hub , "file.write" );
7474 if (delegate == null ) {
75- delegate = new FileOutputStream (file );
75+ delegate = new FileOutputStream (file , append );
7676 }
7777 return new FileOutputStreamInitData (
7878 file , append , span , delegate , hub .getOptions ().isSendDefaultPii ());
0 commit comments