Skip to content

Commit

Permalink
thread sleep on BibleGetIO::initialize to pick up symlink
Browse files Browse the repository at this point in the history
  • Loading branch information
johnrdorazio authored and johnrdorazio committed Nov 16, 2020
1 parent a90f39e commit 0657f21
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/io/bibleget/BibleGetIO.java
Expand Up @@ -1157,9 +1157,9 @@ private static boolean JCEFisSysDepsSatisfied(){
//builder.redirectInput(ProcessBuilder.Redirect.INHERIT);
//builder.redirectOutput(ProcessBuilder.Redirect.INHERIT);
Process process = builder.start();
InputStream errStream = process.getErrorStream();
//InputStream errStream = process.getErrorStream();
InputStream inStream = process.getInputStream();
OutputStream outStream = process.getOutputStream();
//OutputStream outStream = process.getOutputStream();

BufferedReader bf = new BufferedReader(new InputStreamReader(inStream));
bf.lines().forEach(BibleGetIO::checkDependencyInstalled);
Expand Down Expand Up @@ -1204,6 +1204,7 @@ private static boolean JCEFisEnvReady(){
Executors.newSingleThreadExecutor().submit(streamGobbler);
int exitCode = process.waitFor();
if(exitCode == 0){
Thread.sleep(10);
//we have the path to the soffice launcher, which is probably a symlink
System.out.println("soffice launch file = " + BibleGetIO.sofficeLaunch);
if(Files.exists(Paths.get(BibleGetIO.sofficeLaunch)) && Files.isSymbolicLink(Paths.get(BibleGetIO.sofficeLaunch)) ){
Expand Down

0 comments on commit 0657f21

Please sign in to comment.