]> khamidou — GitHub mirrors - electron.git/commitdiff
Support opening file: URLs directly
authorKevin Sawicki <kevinsawicki@gmail.com>
Thu, 4 Feb 2016 18:34:36 +0000 (10:34 -0800)
committerKevin Sawicki <kevinsawicki@gmail.com>
Thu, 4 Feb 2016 18:34:36 +0000 (10:34 -0800)
atom/browser/default_app/main.js

index 09082804b3cd22af9aff7d45f840ee040d9b267b..3ec80a6975f4344262fe9ca9694a34cb78ddb298 100644 (file)
@@ -281,7 +281,7 @@ if (option.file && !option.webdriver) {
   var file = option.file;
   var protocol = url.parse(file).protocol;
   var extension = path.extname(file);
-  if (protocol === 'http:' || protocol === 'https:') {
+  if (protocol === 'http:' || protocol === 'https:' || protocol === 'file:') {
     loadApplicationByUrl(file);
   } else if (extension === '.html' || extension === '.htm') {
     loadApplicationByUrl('file://' + path.resolve(file));