From b74dd43ff564430a54b261688f9cd78dfb46b0b4 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 4 Feb 2016 10:34:36 -0800 Subject: [PATCH] Support opening file: URLs directly --- atom/browser/default_app/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atom/browser/default_app/main.js b/atom/browser/default_app/main.js index 0908280..3ec80a6 100644 --- a/atom/browser/default_app/main.js +++ b/atom/browser/default_app/main.js @@ -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)); -- 2.7.4