JAL-3247 JAL-3254 Getdown now opening any files thrown at it by a file-association...
authorBen Soares <bsoares@dundee.ac.uk>
Wed, 8 May 2019 16:33:45 +0000 (17:33 +0100)
committerBen Soares <bsoares@dundee.ac.uk>
Wed, 8 May 2019 16:33:45 +0000 (17:33 +0100)
getdown/lib/getdown-launcher.jar
getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/Application.java
getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/Getdown.java
getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/GetdownApp.java

index a72da96..1f38352 100644 (file)
Binary files a/getdown/lib/getdown-launcher.jar and b/getdown/lib/getdown-launcher.jar differ
index b6ae55d..4d75236 100644 (file)
@@ -1061,10 +1061,10 @@ public class Application
           if (j > -1) {
             ext = filename.substring(j+1);
           }
-          if (startupFileExtensions.contains(ext.toLowerCase())) {
+          if (locatorFileExtension.equals(ext.toLowerCase())) {
+            // this file extension should have been dealt with in Getdown class
+          } else {
             _appargs.add(0, "-open");
-          } else if (locatorFileExtension.equals(ext.toLowerCase())) {
-            // deal with this when first encountered in Getdown!
           }
         }
 
@@ -1869,6 +1869,5 @@ public class Application
     protected static final String ENV_VAR_PREFIX = "%ENV.";
     protected static final Pattern ENV_VAR_PATTERN = Pattern.compile("%ENV\\.(.*?)%");
     
-    public static final List<String> startupFileExtensions = Arrays.asList(new String[] { "jvp" });
     public static final String locatorFileExtension = "jvl";
 }
index 7269c85..f87382a 100644 (file)
@@ -1054,15 +1054,6 @@ public abstract class Getdown extends Thread
           if (j > -1) {
             ext = filename.substring(j+1);
           }
-          // jvp files etc
-          boolean addedStartupFile = false; // only add one startup file
-          if (_app.startupFileExtensions.contains(ext.toLowerCase()) && ! addedStartupFile) {
-            File f = new File(filename);
-            if (f.exists()) {
-              _app.addStartupFile(f);
-              addedStartupFile = true;
-            }
-          }
           // jvl files
           if (_app.locatorFileExtension.equals(ext.toLowerCase())) {
             // Do something special with this here
@@ -1088,6 +1079,16 @@ public abstract class Getdown extends Thread
                 }
               }
             }
+          } else {
+            // jvp files etc
+            boolean addedStartupFile = false; // only add one startup file
+            if (! addedStartupFile) {
+              File f = new File(filename);
+              if (f.exists()) {
+                _app.addStartupFile(f);
+                addedStartupFile = true;
+              }
+            }
           }
         }
       }
index 32890fa..42dca17 100644 (file)
@@ -98,7 +98,7 @@ public class GetdownApp
                 @Override
                 public void startupPerformed(String parameters)
                 {
-                  GetdownApp.setStartupFilesParameterString(parameters);
+                  setStartupFilesParameterString(parameters);
                 }
               });
     } catch (Exception e)