dbf importer small fix
This commit is contained in:
parent
c3fb5a8dc7
commit
845d38167b
1 changed files with 1 additions and 2 deletions
|
|
@ -9,7 +9,6 @@ import ru.spcex.clearing.dbf.importer.properties.AProperties;
|
|||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.Objects;
|
||||
import java.util.UUID;
|
||||
|
|
@ -33,7 +32,7 @@ public class LoadFileFromDisk extends Stage {
|
|||
log.debug("uuid {}. Read all bytes from source file {}", taskUuid, resultContainer.getDbfFile().getName());
|
||||
fileBytes = Files.readAllBytes(Paths.get(dbfFile.getAbsolutePath()));
|
||||
if (fileBytes.length == 0) throw new IOException("Empty file");
|
||||
if (properties.deleteSrcFiles()) Files.delete(Path.of(dbfFile.getPath()));
|
||||
if (properties.deleteSrcFiles()) Files.delete(dbfFile.toPath());
|
||||
} catch (IOException e) {
|
||||
log.error(String.format("uuid %s. Can't read file %s", taskUuid, resultContainer.getDbfFile().getName()), e);
|
||||
return StageResult.ERROR;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue