File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
full/src/main/java/org/hisrc/jsonix Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,19 @@ public static void main(String[] args) throws Exception {
56
56
// TODO
57
57
System .setProperty ("javax.xml.accessExternalDTD" , "all" );
58
58
59
+ File targetDirectory = settings .getTargetDirectory ();
60
+
61
+ if (targetDirectory == null ) {
62
+ targetDirectory = new File ("." );
63
+ }
64
+
65
+ if (!targetDirectory .exists ()) {
66
+ targetDirectory .mkdirs ();
67
+ }
68
+
69
+ arguments .add ("-d" );
70
+ arguments .add (targetDirectory .getAbsolutePath ());
71
+
59
72
final Options options = new Options ();
60
73
61
74
options .parseArguments (arguments .toArray (new String [arguments .size ()]));
@@ -87,7 +100,6 @@ private void execute() {
87
100
88
101
final File targetDirectory = getOptions ().targetDir ;
89
102
90
- targetDirectory .mkdirs ();
91
103
92
104
final ProgramWriter <NType , NClass > programWriter = new TargetDirectoryProgramWriter (
93
105
targetDirectory , errorHandler );
You can’t perform that action at this time.
0 commit comments