diff --git a/extensions-to-port/tinytest/tinytest.coffee b/extensions-to-port/tinytest/tinytest.coffee index f5764444e..d2fc8147e 100644 --- a/extensions-to-port/tinytest/tinytest.coffee +++ b/extensions-to-port/tinytest/tinytest.coffee @@ -13,7 +13,7 @@ class TinyTest extends Extension 'Command-Ctrl-T': 'runTests' runTests: -> - _.map File.list(@window.path + '/test'), @runTest + _.map File.list(atom.path + '/test'), @runTest runTest: (path) -> # Even though we already have the path, run it diff --git a/extensions/filefinder/filefinder-pane.coffee b/extensions/filefinder/filefinder-pane.coffee index b8279e19e..440dc2683 100644 --- a/extensions/filefinder/filefinder-pane.coffee +++ b/extensions/filefinder/filefinder-pane.coffee @@ -38,7 +38,7 @@ class FilefinderPane extends Pane paths: -> _paths = [] - for dir in File.list window.path + for dir in File.list atom.path continue if /\.git|Cocoa/.test dir _paths.push File.listDirectoryTree dir _.reject _.flatten(_paths), (dir) -> File.isDirectory dir @@ -47,7 +47,7 @@ class FilefinderPane extends Pane @modal.show() @files = [] for file in @paths() - @files.push file.replace "#{window.path}/", '' + @files.push file.replace "#{atom.path}/", '' @filterFiles() findMatchingFiles: (query) -> @@ -80,7 +80,7 @@ class FilefinderPane extends Pane $('#filefinder li:first').addClass 'selected' openSelected: -> - dir = window.path + dir = atom.path file = $('#filefinder .selected').text() window.open "#{dir}/#{file}" @toggle() diff --git a/extensions/tree/tree-pane.coffee b/extensions/tree/tree-pane.coffee index e202e5264..32fbcad67 100644 --- a/extensions/tree/tree-pane.coffee +++ b/extensions/tree/tree-pane.coffee @@ -46,7 +46,7 @@ class TreePane extends Pane true reload: -> - @html.children('#tree .cwd').text _.last window.path.split '/' + @html.children('#tree .cwd').text _.last atom.path.split '/' fileList = @createList @tree.paths fileList.addClass 'files' @html.children('#tree .files').replaceWith fileList diff --git a/extensions/tree/tree.coffee b/extensions/tree/tree.coffee index 3f98a33aa..bc8781023 100644 --- a/extensions/tree/tree.coffee +++ b/extensions/tree/tree.coffee @@ -18,7 +18,7 @@ class Tree extends Extension atom.keybinder.load require.resolve "tree/key-bindings.coffee" # watch the root dir - Watcher.watch window.path, @watchDir + Watcher.watch atom.path, @watchDir # Hide dirs that no longer exist, watch dirs that do. for dir in @shownDirs() @@ -27,25 +27,25 @@ class Tree extends Extension else Watcher.watch dir, @watchDir - @paths = @findPaths window.path + @paths = @findPaths atom.path @pane = new TreePane @ startup: -> @pane.show() shutdown: -> - @unwatchDir window.path + @unwatchDir atom.path @unwatchDir dir for dir in @shownDirs() reload: -> @pane.reload() shownDirStorageKey: -> - @.constructor.name + ":" + window.path + ":shownDirs" + @.constructor.name + ":" + atom.path + ":shownDirs" watchDir: (changeType, dir) => # Update the paths - @paths = @findPaths window.path + @paths = @findPaths atom.path @pane.reload() unwatchDir: (dir) -> diff --git a/src/atom/window.coffee b/src/atom/window.coffee index 450d3c877..b503ac55a 100644 --- a/src/atom/window.coffee +++ b/src/atom/window.coffee @@ -9,7 +9,7 @@ windowAdditions = path: null startup: -> - @path = $atomController.path.toString() + @path = atom.path @setTitle (_.last @path.split '/') or 'Untitled Document' $atomController.window.makeKeyWindow diff --git a/src/startup.coffee b/src/startup.coffee index 490067c05..1bbf917ff 100644 --- a/src/startup.coffee +++ b/src/startup.coffee @@ -32,7 +32,7 @@ atom.app = new App for name, method of atom.app atom[name] = atom.app[name] -atom.path = $atomController.path.toString() +atom.path = $atomController.path?.valueOf() if handler = Document.handler atom.path atom.document = new handler atom.path else