JS backend: fix KT-6277 kotlinc-js: IllegalArgumentException when -output is a file name without directory prefix

#KT-6277 Fixed
This commit is contained in:
Michael Nedzelsky
2014-11-19 11:38:44 +03:00
parent de2acc31ee
commit 505775218a
@@ -153,7 +153,11 @@ public class K2JSCompiler extends CLICompiler<K2JSCompilerArguments> {
OutputFileCollection outputFiles = translate(mainCallParameters, config, sourcesFiles, outputFile, outputPrefixFile, outputPostfixFile);
OutputUtilsPackage.writeAll(outputFiles, outputFile.getParentFile(), messageCollector);
File outputDir = outputFile.getParentFile();
if (outputDir == null) {
outputDir = outputFile.getAbsoluteFile().getParentFile();
}
OutputUtilsPackage.writeAll(outputFiles, outputDir, messageCollector);
return OK;
}