Fix downloading/exporting when overwriting file would not truncate

This commit is contained in:
Stypox 2024-11-24 18:34:22 +01:00
parent 8af786f26d
commit c80c378398
3 changed files with 15 additions and 3 deletions

View file

@ -76,7 +76,7 @@ public class SubscriptionsExportService extends BaseImportExportService {
try {
outFile = new StoredFileHelper(this, path, "application/json");
outputStream = new SharpOutputStream(outFile.getStream());
outputStream = new SharpOutputStream(outFile.openAndTruncateStream());
} catch (final IOException e) {
handleError(e);
return START_NOT_STICKY;