diff options
author | Nivesh Rajbhandari | 2012-04-09 16:05:16 -0700 |
---|---|---|
committer | Nivesh Rajbhandari | 2012-04-09 16:05:16 -0700 |
commit | 36df4f454d64c7b43062835495425021ce955b05 (patch) | |
tree | 9ebbe37bf22cb5280882a0ef5b95196fcf163251 /js/io/system | |
parent | 952e0b2c28af081041fa8987c3e865b931d052fa (diff) | |
parent | bd43ce383b050d03b0f92cc923c517febc66ca28 (diff) | |
download | ninja-36df4f454d64c7b43062835495425021ce955b05.tar.gz |
Merge branch 'refs/heads/ninja-internal' into AllFixes
Diffstat (limited to 'js/io/system')
-rwxr-xr-x | js/io/system/coreioapi.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/js/io/system/coreioapi.js b/js/io/system/coreioapi.js index b0ffe2d8..a06f45c6 100755 --- a/js/io/system/coreioapi.js +++ b/js/io/system/coreioapi.js | |||
@@ -1085,14 +1085,14 @@ exports.CoreIoApi = Montage.create(Component, { | |||
1085 | isValidUri:{ | 1085 | isValidUri:{ |
1086 | value: function(uri){ | 1086 | value: function(uri){ |
1087 | var isWindowsUri=false, isUnixUri=false,status=false; | 1087 | var isWindowsUri=false, isUnixUri=false,status=false; |
1088 | if(uri !== ""){ | 1088 | if((uri !== null) && (uri !== "")){ |
1089 | uri = uri.replace(/^\s+|\s+$/g,""); // strip any leading or trailing spaces | 1089 | uri = uri.replace(/^\s+|\s+$/g,""); // strip any leading or trailing spaces |
1090 | 1090 | ||
1091 | //for local machine folder uri | 1091 | //for local machine folder uri |
1092 | isWindowsUri = /^([a-zA-Z]:)([\\/][^<>:"/\\|?*]+)*[\\/]?$/gi.test(uri); | 1092 | isWindowsUri = /^([a-zA-Z]:)([\\/][^<>:"/\\|?*]+)*[\\/]?$/gi.test(uri); |
1093 | isUnixUri = /^(\/)?(\/(?![.])[^/]*)*\/?$/gi.test(uri);//folders beginning with . are hidden on Mac / Unix | 1093 | isUnixUri = /^(\/)?(\/(?![.])[^/]*)*\/?$/gi.test(uri);//folders beginning with . are hidden on Mac / Unix |
1094 | status = isWindowsUri || isUnixUri; | 1094 | status = isWindowsUri || isUnixUri; |
1095 | if(isWindowsUri && isUnixUri){status = false;} | 1095 | if((uri === "") || (isWindowsUri && isUnixUri)){status = false;} |
1096 | } | 1096 | } |
1097 | return status; | 1097 | return status; |
1098 | } | 1098 | } |