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
This commit is contained in:
Kevin Sawicki
2013-10-07 17:21:02 -07:00
parent 1ed6733ab5
commit 8caed2081b

View File

@@ -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