From 2af026dc710258b85b4cbddceac437fd90f5276f Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Mon, 26 Mar 2018 18:53:14 -0400 Subject: [PATCH] check individual extensions on Windows startup --- app/src/processing/app/platform/WindowsPlatform.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/src/processing/app/platform/WindowsPlatform.java b/app/src/processing/app/platform/WindowsPlatform.java index c8293c33b..2238b8631 100644 --- a/app/src/processing/app/platform/WindowsPlatform.java +++ b/app/src/processing/app/platform/WindowsPlatform.java @@ -140,10 +140,18 @@ public class WindowsPlatform extends DefaultPlatform { // Check the key that should be set by a previous run of Processing String knownCommand = WindowsRegistry.getStringValue(REGISTRY_ROOT_KEY.CURRENT_USER, - "Software\\Classes\\" + REG_DOC + "\\shell\\open\\command", ""); + "Software\\Classes\\" + REG_DOC + "\\shell\\open\\command", ""); // If the association hasn't been set, or it's not correct, set it. if (knownCommand == null || !knownCommand.equals(REG_OPEN_COMMAND)) { setAssociations(); + + } else { // check each extension + for (String extension : APP_EXTENSIONS) { + if (!WindowsRegistry.valueExists(REGISTRY_ROOT_KEY.CURRENT_USER, + "Software\\Classes", extension)) { + setAssociations(); + } + } } } } catch (Exception e) {