diff options
author | Jose Antonio Marquez | 2012-04-10 11:24:21 -0700 |
---|---|---|
committer | Jose Antonio Marquez | 2012-04-10 11:24:21 -0700 |
commit | d14f78b06d37aa469885f2ecf84419bcb7e3e613 (patch) | |
tree | 91b95c6c9aef779a743b710105546a8ae74bff12 /js/io/system | |
parent | a9bcc403df76ad2cb7c31ff7fdd42a85c35cf424 (diff) | |
parent | bd43ce383b050d03b0f92cc923c517febc66ca28 (diff) | |
download | ninja-d14f78b06d37aa469885f2ecf84419bcb7e3e613.tar.gz |
Merge branch 'refs/heads/Ninja-Internal' into FileIO
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 | } |