diff options
author | Jose Antonio Marquez | 2012-02-01 13:31:56 -0800 |
---|---|---|
committer | Jose Antonio Marquez | 2012-02-01 13:31:56 -0800 |
commit | d3208408027c90696af91883935279cf4d023ddc (patch) | |
tree | 353e60c8b0cc30012dfd5a0d3573bd0055d30bd3 /js/lib | |
parent | 54ccd309722797e79ca35fe115b0372e86850551 (diff) | |
parent | fc4d32e0df064ecdbe7ed86aab25eeab58253032 (diff) | |
download | ninja-d3208408027c90696af91883935279cf4d023ddc.tar.gz |
Merge branch 'refs/heads/AnanyaFileIO' into FileIO
Diffstat (limited to 'js/lib')
-rwxr-xr-x | js/lib/NJUtils.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/js/lib/NJUtils.js b/js/lib/NJUtils.js index d6548871..56c74b3b 100755 --- a/js/lib/NJUtils.js +++ b/js/lib/NJUtils.js | |||
@@ -206,6 +206,8 @@ exports.NJUtils = Object.create(Object.prototype, { | |||
206 | ///// Return the last part of a path (e.g. filename) | 206 | ///// Return the last part of a path (e.g. filename) |
207 | getFileNameFromPath : { | 207 | getFileNameFromPath : { |
208 | value: function(path) { | 208 | value: function(path) { |
209 | path = path.replace(/[/\\]$/g,""); | ||
210 | path = path.replace(/\\/g,"/"); | ||
209 | return path.substr(path.lastIndexOf('/') + 1); | 211 | return path.substr(path.lastIndexOf('/') + 1); |
210 | } | 212 | } |
211 | } | 213 | } |