       describe "when a directory is created within a directory with another squashed directory", ->
         it "un-squashes the directories", ->
           jasmine.attachToDOM(workspaceElement)
-          piDir = $(treeView.roots[0].entries).find(".directory:contains(omicron#{path.sep}pi):first")[0]
+          if path.sep is '\\'
+            # First escape the backslashes for Coffeescript, then escape them for jQuery
+            piDir = $(treeView.roots[0].entries).find(".directory:contains(omicron\\\\pi):first")[0]
+          else
+            piDir = $(treeView.roots[0].entries).find(".directory:contains(omicron#{path.sep}pi):first")[0]
           expect(piDir).not.toBeNull()
           # omicron is a squashed dir, so searching for omicron would give us omicron/pi instead
           omicronPath = piDir.getPath().replace "#{path.sep}pi", ""


      runs ->
        expect(atom.notifications.getNotifications()[0].getMessage()).toContain 'Opening folder in OS file manager failed'
        expect(atom.notifications.getNotifications()[0].getDetail()).toContain 'ENOENT'

  describe "showCurrentFileInFileManager()", ->
    it "does nothing when no file is opened", ->

      describe "when a squashed directory is deleted", ->
        it "un-squashes the directories", ->
          jasmine.attachToDOM(workspaceElement)
          if path.sep is '\\'
            # First escape the backslashes for Coffeescript, then escape them for jQuery
            piDir = $(treeView.roots[0].entries).find(".directory:contains(omicron\\\\pi):first")[0]
          else
            piDir = $(treeView.roots[0].entries).find(".directory:contains(omicron#{path.sep}pi):first")[0]

          treeView.focus()
          treeView.selectEntry(piDir)
          spyOn(atom, 'confirm').andCallFake (dialog) ->
