aboutsummaryrefslogtreecommitdiff
path: root/js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.js
diff options
context:
space:
mode:
authorAnanya Sen2012-04-06 15:31:43 -0700
committerAnanya Sen2012-04-06 15:31:43 -0700
commitefe18b4c8e52667683727139e9f9e28f66381164 (patch)
tree7c6a22bec2b556cbb2f7732fc8595d9f713ad064 /js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.js
parent0f6cee34ae696f72c7bedc23b7aaa0b1e08b5f6b (diff)
downloadninja-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/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.js')
-rw-r--r--js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.js b/js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.js
index 552e8f6f..1a26c99c 100644
--- a/js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.js
+++ b/js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.js
@@ -493,6 +493,7 @@ var NewFileOptionsNavigator = exports.NewFileOptionsNavigator = Montage.create(C
493 var status = false; 493 var status = false;
494 if((fileName !== null) && (fileName !== "")){ 494 if((fileName !== null) && (fileName !== "")){
495 fileName = fileName.replace(/^\s+|\s+$/g,""); 495 fileName = fileName.replace(/^\s+|\s+$/g,"");
496 if(fileName === ""){return false;}
496 status = !(/[/\\]/g.test(fileName)); 497 status = !(/[/\\]/g.test(fileName));
497 if(status && navigator.userAgent.indexOf("Macintosh") != -1){//for Mac files beginning with . are hidden 498 if(status && navigator.userAgent.indexOf("Macintosh") != -1){//for Mac files beginning with . are hidden
498 status = !(/^\./g.test(fileName)); 499 status = !(/^\./g.test(fileName));