Merge branch 'master' into api/docs

This commit is contained in:
Garen Torikian
2013-04-18 11:20:23 -07:00
2 changed files with 13 additions and 1 deletions

11
atom.sh
View File

@@ -1,5 +1,14 @@
#!/bin/sh
open -a /Applications/Atom.app -n --args --executed-from="$(pwd)" --pid=$$ $@
ATOM_PATH=/Applications/Atom.app
if [ ! -d $ATOM_PATH ]; then sleep 5; fi # Wait for Atom to reappear, Sparkle may be replacing it.
if [ ! -d $ATOM_PATH ]; then
echo "Atom Application not found at '$ATOM_PATH'" >&2
exit 1
fi
open -a $ATOM_PATH -n --args --executed-from="$(pwd)" --pid=$$ $@
# Used to exit process when atom is used as $EDITOR
on_die() {

View File

@@ -150,6 +150,9 @@
for (NSWindow *window in [self windows]) {
if (![window isExcludedFromWindowsMenu]) {
AtomWindowController *controller = [window windowController];
if (!controller.pathToOpen) {
continue;
}
if (!openingDirectory) {
BOOL openedPathIsDirectory = false;
[[NSFileManager defaultManager] fileExistsAtPath:controller.pathToOpen isDirectory:&openedPathIsDirectory];