Skip to content

Commit bf1fc57

Browse files
committed
check individual extensions on Windows startup
1 parent e34b864 commit bf1fc57

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

app/src/processing/app/platform/WindowsPlatform.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,18 @@ protected void checkAssociations() {
140140
// Check the key that should be set by a previous run of Processing
141141
String knownCommand =
142142
WindowsRegistry.getStringValue(REGISTRY_ROOT_KEY.CURRENT_USER,
143-
"Software\\Classes\\" + REG_DOC + "\\shell\\open\\command", "");
143+
"Software\\Classes\\" + REG_DOC + "\\shell\\open\\command", "");
144144
// If the association hasn't been set, or it's not correct, set it.
145145
if (knownCommand == null || !knownCommand.equals(REG_OPEN_COMMAND)) {
146146
setAssociations();
147+
148+
} else { // check each extension
149+
for (String extension : APP_EXTENSIONS) {
150+
if (!WindowsRegistry.valueExists(REGISTRY_ROOT_KEY.CURRENT_USER,
151+
"Software\\Classes", extension)) {
152+
setAssociations();
153+
}
154+
}
147155
}
148156
}
149157
} catch (Exception e) {

0 commit comments

Comments
 (0)