diff options
author | Ananya Sen | 2012-04-06 15:31:43 -0700 |
---|---|---|
committer | Ananya Sen | 2012-04-06 15:31:43 -0700 |
commit | efe18b4c8e52667683727139e9f9e28f66381164 (patch) | |
tree | 7c6a22bec2b556cbb2f7732fc8595d9f713ad064 /js/io/ui/save-as-dialog.reel/save-as-dialog.js | |
parent | 0f6cee34ae696f72c7bedc23b7aaa0b1e08b5f6b (diff) | |
download | ninja-efe18b4c8e52667683727139e9f9e28f66381164.tar.gz |
block filenames and directories with all space
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'js/io/ui/save-as-dialog.reel/save-as-dialog.js')
-rw-r--r-- | js/io/ui/save-as-dialog.reel/save-as-dialog.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/js/io/ui/save-as-dialog.reel/save-as-dialog.js b/js/io/ui/save-as-dialog.reel/save-as-dialog.js index 5df91ab9..e2f50ff5 100644 --- a/js/io/ui/save-as-dialog.reel/save-as-dialog.js +++ b/js/io/ui/save-as-dialog.reel/save-as-dialog.js | |||
@@ -266,6 +266,7 @@ var SaveAsDialog = exports.SaveAsDialog = Montage.create(Component, { | |||
266 | var status = false; | 266 | var status = false; |
267 | if((fileName !== null) && (fileName !== "")){ | 267 | if((fileName !== null) && (fileName !== "")){ |
268 | fileName = fileName.replace(/^\s+|\s+$/g,""); | 268 | fileName = fileName.replace(/^\s+|\s+$/g,""); |
269 | if(fileName === ""){return false;} | ||
269 | status = !(/[/\\]/g.test(fileName)); | 270 | status = !(/[/\\]/g.test(fileName)); |
270 | if(status && navigator.userAgent.indexOf("Macintosh") != -1){//for Mac files beginning with . are hidden | 271 | if(status && navigator.userAgent.indexOf("Macintosh") != -1){//for Mac files beginning with . are hidden |
271 | status = !(/^\./g.test(fileName)); | 272 | status = !(/^\./g.test(fileName)); |