@@ -46,6 +46,8 @@ define(function (require, exports, module) {
4646 _domainPath = [ _bracketsPath , _modulePath , _nodePath ] . join ( "/" ) ,
4747 _nodeDomain = new NodeDomain ( "fileWatcher" , _domainPath ) ;
4848
49+ var _isRunningOnWindowsXP = navigator . userAgent . indexOf ( "Windows NT 5." ) >= 0 ;
50+
4951 // If the connection closes, notify the FileSystem that watchers have gone offline.
5052 $ ( _nodeDomain . connection ) . on ( "close" , function ( event , promise ) {
5153 if ( _offlineCallback ) {
@@ -148,13 +150,6 @@ define(function (require, exports, module) {
148150 return FileSystemError . UNKNOWN ;
149151 }
150152
151- /**
152- * Determines if we're running on Windows XP
153- */
154- function _isRunningOnWindowsXP ( ) {
155- return ( navigator . userAgent . indexOf ( "Windows NT 5." ) >= 0 ) ;
156- }
157-
158153 /**
159154 * Convert a callback to one that transforms its first parameter from an
160155 * appshell error code to a FileSystemError string.
@@ -492,13 +487,13 @@ define(function (require, exports, module) {
492487 * cleared when the offlineCallback is called.
493488 *
494489 * @param {function(?string, FileSystemStats=) } changeCallback
495- * @param {function()= } callback
490+ * @param {function()= } offlineCallback
496491 */
497492 function initWatchers ( changeCallback , offlineCallback ) {
498493 _changeCallback = changeCallback ;
499494 _offlineCallback = offlineCallback ;
500495
501- if ( _isRunningOnWindowsXP ( ) && _offlineCallback ) {
496+ if ( _isRunningOnWindowsXP && _offlineCallback ) {
502497 _offlineCallback ( ) ;
503498 }
504499 }
@@ -515,8 +510,8 @@ define(function (require, exports, module) {
515510 * @param {function(?string)= } callback
516511 */
517512 function watchPath ( path , callback ) {
518- if ( _isRunningOnWindowsXP ( ) ) {
519- callback ( FileSystemError . PATH_WATCHING_NOT_SUPPORTED ) ;
513+ if ( _isRunningOnWindowsXP ) {
514+ callback ( FileSystemError . NOT_SUPPORTED ) ;
520515 return ;
521516 }
522517 appshell . fs . isNetworkDrive ( path , function ( err , isNetworkDrive ) {
0 commit comments