adobe/brackets — pull request #4761 by bchintx (2013-08-13 04:42:18+00:00)
Title: PreferencesManager's getClientID() Fails On 64-bit Windows

Problem:
On 64-bit Windows, preference settings in different contexts (eg. extensions) are overlapping. As a result, changing the value of one setting mistakenly changes the same-named preference setting in another context.

For example, "View > Enable JSLint" and "View > Quick View on Hover" both save their state using a preference setting named "enabled". The Preference Manager is supposed to keep these two, different extension settings separate. However, on Windows, the getClientID() function is failing and causing the Preference Manager to think both settings live in the same "com.adobe.brackets.main" context. As a result, if you change the JSLint setting and restart Brackets, you'll see that Quick View on Hover has changed to match.

In a nutshell, on 64-bit Windows, Brackets and Edge Code are installed to the folder "C:\Program Files (x86)". The parentheses are passed as the regex string and causing getClientID() to fail to find the subpath to the extensions folder.

Solution:
Escape parentheses in paths before passing it to the regex search.

Related issue: Edge Code issue # 225- "Hover Preview of Images should default 'enabled' on Windows" (https://git.corp.adobe.com/edge/edge-code/issues/225)