mirror of https://github.com/dspinellis/UMLGraph
Double quotes don't work correctly in the Unix exec
(reported by Dirk Datzert) Run exec(String []), which I tested to work on both Windows and Unix.
This commit is contained in:
parent
19d2716782
commit
84a3c98d16
|
|
@ -128,16 +128,16 @@ public class UmlGraphDoc {
|
|||
File mapFile = new File(outputFolder, packageName.replace(".", "/") + "/" + name + ".map");
|
||||
|
||||
try {
|
||||
/*
|
||||
* Put filenames inside double quote characters to allow
|
||||
* (typically Windows) files with embedded whitespace to
|
||||
* work. This will still fail with Unix ` and $ characters,
|
||||
* but it is better than nothing.
|
||||
*/
|
||||
String command = "dot -Tcmapx -o\"" + mapFile.getAbsolutePath() + "\" -Tpng -o\"" +
|
||||
pngFile.getAbsolutePath() + "\" \"" +
|
||||
dotFile.getAbsolutePath() + "\"";
|
||||
Process p = Runtime.getRuntime().exec(command);
|
||||
Process p = Runtime.getRuntime().exec(new String [] {
|
||||
"dot",
|
||||
"-Tcmapx",
|
||||
"-o",
|
||||
mapFile.getAbsolutePath(),
|
||||
"-Tpng",
|
||||
"-o",
|
||||
pngFile.getAbsolutePath(),
|
||||
dotFile.getAbsolutePath()
|
||||
});
|
||||
BufferedReader reader = new BufferedReader(new InputStreamReader(p.getErrorStream()));
|
||||
String line = null;
|
||||
while((line = reader.readLine()) != null)
|
||||
|
|
|
|||
|
|
@ -128,16 +128,16 @@ public class UmlGraphDoc {
|
|||
File mapFile = new File(outputFolder, packageName.replace(".", "/") + "/" + name + ".map");
|
||||
|
||||
try {
|
||||
/*
|
||||
* Put filenames inside double quote characters to allow
|
||||
* (typically Windows) files with embedded whitespace to
|
||||
* work. This will still fail with Unix ` and $ characters,
|
||||
* but it is better than nothing.
|
||||
*/
|
||||
String command = "dot -Tcmapx -o\"" + mapFile.getAbsolutePath() + "\" -Tpng -o\"" +
|
||||
pngFile.getAbsolutePath() + "\" \"" +
|
||||
dotFile.getAbsolutePath() + "\"";
|
||||
Process p = Runtime.getRuntime().exec(command);
|
||||
Process p = Runtime.getRuntime().exec(new String [] {
|
||||
"dot",
|
||||
"-Tcmapx",
|
||||
"-o",
|
||||
mapFile.getAbsolutePath(),
|
||||
"-Tpng",
|
||||
"-o",
|
||||
pngFile.getAbsolutePath(),
|
||||
dotFile.getAbsolutePath()
|
||||
});
|
||||
BufferedReader reader = new BufferedReader(new InputStreamReader(p.getErrorStream()));
|
||||
String line = null;
|
||||
while((line = reader.readLine()) != null)
|
||||
|
|
|
|||
Loading…
Reference in New Issue