Fix syntax error in fs.base

This commit is contained in:
Corey Johnson
2012-05-01 14:26:32 -07:00
parent cb0e576949
commit 0227b11bf3

View File

@@ -15,7 +15,7 @@ module.exports =
# remove a trailing extension.
base: (path, ext) ->
base = path.replace(/\/$/, '').split("/").pop()
if ext then base.replace(RegEx(ext + "$"), "") else base
if ext then base.replace(RegExp(ext + "$"), "") else base
# Returns the path of a file's containing directory, albeit the
# parent directory if the file is a directory. A terminal directory