From 835cd70dedacb00b30d18e26d9356d9497a65ae4 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 12 Jun 2013 16:33:36 -0700 Subject: [PATCH] Use Path.dirname() internally --- src/stdlib/fs-utils.coffee | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/stdlib/fs-utils.coffee b/src/stdlib/fs-utils.coffee index aa573fa6c..0c322b287 100644 --- a/src/stdlib/fs-utils.coffee +++ b/src/stdlib/fs-utils.coffee @@ -121,11 +121,11 @@ module.exports = # Open, write, flush, and close a file, writing the given content. write: (path, content) -> - mkdirp.sync(@directory(path)) + mkdirp.sync(Path.dirname(path)) fs.writeFileSync(path, content) writeAsync: (path, content, callback) -> - mkdirp @directory(path), (error) -> + mkdirp Path.dirname(path), (error) -> if error? callback?(error) else @@ -135,7 +135,7 @@ module.exports = fs.mkdirSync(path) copy: (sourcePath, destinationPath, done) -> - mkdirp @directory(destinationPath), (error) -> + mkdirp Path.dirname(destinationPath), (error) -> if error? done?(error) return @@ -160,7 +160,7 @@ module.exports = makeTree: (path) -> return unless path if not @exists(path) - @makeTree(@directory(path)) + @makeTree(Path.dirname(path)) @makeDirectory(path) traverseTreeSync: (rootPath, onFile, onDirectory) ->