From 2ae59042967fd82531924c66c0184d391c7c7415 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Wed, 21 Apr 2010 11:39:59 +0200 Subject: #i100845# let -o switch write several files into one directory --- transex3/java/jpropex/java/JPropEx.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'transex3') diff --git a/transex3/java/jpropex/java/JPropEx.java b/transex3/java/jpropex/java/JPropEx.java index 2ba1e913f5d4..20175febe5d5 100644 --- a/transex3/java/jpropex/java/JPropEx.java +++ b/transex3/java/jpropex/java/JPropEx.java @@ -223,7 +223,13 @@ public class JPropEx .append( "_" ).append( lang.replaceAll("-","_") ).append( ".properties" ).toString(); } else if( outputFileArg != null && outputFileArg.length()>0 ) + { name = outputFileArg; + name += new StringBuffer().append( inputFileArg.substring( filenameIdx , filename.lastIndexOf( ".properties" ) ) ) + .append( "_" ).append( lang.replaceAll("-","_") ).append( ".properties" ).toString(); + + //name = outputFileArg; + } else { System.err.println("ERROR: No outputfile specified .. either -o or -x -y !"); @@ -249,6 +255,7 @@ public class JPropEx } path += name; // Write the properties file + System.out.println("DBG: Writing to "+path); try{ BufferedOutputStream out = new BufferedOutputStream( new FileOutputStream( path ) ); if( prop == null ) -- cgit