Some clean up

This commit is contained in:
Maschell 2019-05-04 11:27:35 +02:00
parent 0ed359a43a
commit 96e048b4b5

View File

@ -46,9 +46,6 @@ public final class DecryptionService {
} }
private DecryptionService(FSTDataProvider dataProvider) { private DecryptionService(FSTDataProvider dataProvider) {
// if (dataProvider instanceof Parallelizable) {
// parallelizable = true;
// }
this.dataProvider = dataProvider; this.dataProvider = dataProvider;
} }
@ -87,8 +84,6 @@ public final class DecryptionService {
return; return;
} }
File target = new File(targetFilePath);
if (skipExistingFile) { if (skipExistingFile) {
File targetFile = new File(targetFilePath); File targetFile = new File(targetFilePath);
if (targetFile.exists()) { if (targetFile.exists()) {
@ -106,9 +101,10 @@ public final class DecryptionService {
} }
} }
File target = new File(targetFilePath);
// to avoid having fragmented files. // to avoid having fragmented files.
FileUtils.FileAsOutputStreamWrapper(new File(targetFilePath), entry.getFileSize(), FileUtils.FileAsOutputStreamWrapper(target, entry.getFileSize(), newOutputStream -> decryptFSTEntryToStream(entry, newOutputStream));
newOutputStream -> decryptFSTEntryToStream(entry, newOutputStream));
} catch (Exception ex) { } catch (Exception ex) {
throw new CompletionException(ex); throw new CompletionException(ex);
} }