From 12f3f3f41d16804dda3577723e3415298ba1aa9d Mon Sep 17 00:00:00 2001 From: Georgy Litvinov Date: Sun, 16 Oct 2016 22:01:09 +0300 Subject: [PATCH] Fixed filepath --- src/main/java/ru/ras/iph/impose/ImposeonA3.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/ru/ras/iph/impose/ImposeonA3.java b/src/main/java/ru/ras/iph/impose/ImposeonA3.java index 863909b..781418b 100644 --- a/src/main/java/ru/ras/iph/impose/ImposeonA3.java +++ b/src/main/java/ru/ras/iph/impose/ImposeonA3.java @@ -34,7 +34,11 @@ public static void main(String[] args) throws IOException, DocumentException { System.exit(1); } FileInputStream is = new FileInputStream(inputFile); - File outputFile = new File( inputFile.getParent() + File.separator + "A3_" + inputFile.getName()); + String parentFolder = ""; + if (inputFile.getParent() != null){ + parentFolder = inputFile.getParent() + File.separator; + } + File outputFile = new File( parentFolder + "A3_" + inputFile.getName()); FileOutputStream os = new FileOutputStream(outputFile); PdfReader reader = new PdfReader(is);