From 8caed2081bb2cf6bb6535c29c2956e6cb988d0ab Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 7 Oct 2013 17:21:02 -0700 Subject: [PATCH] Don't reuse window when opening a subfolder Windows will only be reused when they match the initial path or are paths to a new or existing file. Closes #934 --- src/atom-window.coffee | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/atom-window.coffee b/src/atom-window.coffee index 350aac6f5..a16c5ae3f 100644 --- a/src/atom-window.coffee +++ b/src/atom-window.coffee @@ -55,6 +55,8 @@ class AtomWindow false else if pathToCheck is initialPath true + else if fs.statSyncNoException(pathToCheck).isDirectory() + false else if pathToCheck.indexOf(path.join(initialPath, path.sep)) is 0 true else