Browse Source

Fix init check for process.windowsStore

Windows now allows users to move their `WindowsApps` folder, meaning that it can end up on a different drive (and outside of `Program Files`).
Felix Rieseberg 8 years ago
parent
commit
4aaa936803
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/common/init.js

+ 1 - 1
lib/common/init.js

@@ -56,7 +56,7 @@ if (process.platform === 'win32') {
   //
   // Nobody else get's to install there, changing the path is forbidden
   // We can therefore say that we're running as appx
-  if (__dirname.indexOf('\\Program Files\\WindowsApps\\') === 2) {
+  if (__dirname.includes('\\WindowsApps\\')) {
     process.windowsStore = true
   }
 }