Permalink
Browse files

Kill duplicate realpath call

  • Loading branch information...
1 parent 377ade3 commit 89cb4acc56f56996a5346d5c9502426958f15e46 @josh josh committed Dec 12, 2010
Showing with 13 additions and 22 deletions.
  1. +8 −13 lib/stitch.js
  2. +5 −9 src/stitch.coffee
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -111,15 +111,11 @@ exports.Package = class Package
async.map @paths, fs.realpath, (err, expandedPaths) ->
return callback err if err
- fs.realpath path, (err, path) ->
- return callback err if err
-
- for expandedPath in expandedPaths
- base = expandedPath + "/"
- if path.indexOf(base) is 0
- return callback null, path.slice base.length
-
- callback "#{path} isn't in the require path"
+ for expandedPath in expandedPaths
+ base = expandedPath + "/"
+ if path.indexOf(base) is 0
+ return callback null, path.slice base.length
+ callback "#{path} isn't in the require path"
compileFile: (path, callback) ->
extension = extname(path).slice(1)

0 comments on commit 89cb4ac

Please sign in to comment.