           @push file
           return transformCallback()
       # normalize the path and break it into its constituent elements
-      _path = path.resolve '/', file.relative
+      path = resolve '/', file.relative
         .replace /index\.[^/]+$/, ''          # index identified with directory
         .replace /\.[^./]+$/, '.' + hrefExtension     # e.g. '.jade' -> '.html'
         .split /([^/]*\/)/                    # e.g. '/a/b' -> ['/', 'a/', 'b']
         .filter (element) -> element isnt ''
       # find the right spot for the new resource
       current = navTree
-      for element in _path
+      for element in path
         current = current.children[element] ?= # recurse down the path, filling
           parent: current                      # in tree with missing elements
           children: {}
           exists: no                           # for directories without index
-          title: path.basename element.replace /\/?index[^/]*$/, ''
+          title: basename element.replace /\/?index[^/]*$/, ''
             .toLowerCase()
             .replace /\.[^.]*$/, ''                    # remove extension
             .replace /(?:^|[-._])[a-z]/g, (first) ->

  Object.defineProperties
    title: nav.title
    # how you get here from there, but only if here is an actual place
    href: webPath.relative context[0], webPath.resolve context... if nav.exists
    active: context[0] is webPath.resolve context... # ending where we started?
  ,
    parent:
      enumerable: yes             # these properties should be easy to find

   demoteTopIndex
###

{basename} = require 'path'
through = require 'through2'
{relative, resolve} = require './web-path'

root = rootName = null

