bundles/org.eclipse.orion.client.javascript/web/javascript/scriptResolver.js
function _samePaths(file, path2, meta) {
			if (file === null) {
				return path2 === null;
			}
			if (typeof file === 'undefined') {
				return typeof path2 === 'undefined';
			}
			if (path2 === null) {
				return file === null;
			}
			if (typeof path2 === 'undefined') {
				return typeof file === 'undefined';
			}
			//get rid of extensions and compare the names
			var loc = file.location ? file.location : file.Location;
			if (!loc) {
				return false;
			}
			var idx = loc.lastIndexOf('.');
			var p1 = loc;
			if (idx > -1) {
				p1 = loc.slice(0, idx);
			}
			if (path2 === p1) {
				return true; //could be that only the extension was missing from the other path
			}
			idx = path2.lastIndexOf('.');
			var p2 = path2;
			if (idx > -1) {
				p2 = path2.slice(0, idx);
			}
			if (p1 === p2) {
				return true;
			} else if (p1 === decodeURIComponent(p2)) {
				return true;
			}
			return false;
		}
function _samePaths(file, path2, meta) {
			if (file === null) {
				return path2 === null;
			}
			if (typeof file === 'undefined') {
				return typeof path2 === 'undefined';
			}
			if (path2 === null) {
				return file === null;
			}
			if (typeof path2 === 'undefined') {
				return typeof file === 'undefined';
			}
			//get rid of extensions and compare the names
			var loc = file.location ? file.location : file.Location;
			if (!loc) {
				return false;
			}
			var idx = loc.lastIndexOf('.');
			var p1 = loc;
			if (idx > -1) {
				p1 = loc.slice(0, idx);
			}
			if (path2 === p1) {
				return true; //could be that only the extension was missing from the other path
			}
			idx = path2.lastIndexOf('.');
			var p2 = path2;
			if (idx > -1) {
				p2 = path2.slice(0, idx);
			}
			if (p1 === p2) {
				return true;
			} else if (p1 === decodeURIComponent(p2)) {
				return true;
			}
			return false;
		}
function _samePaths ( file , path2 , meta ) { if ( file === null ) { return path2 === null ; } if ( typeof file === 'undefined' ) { return typeof path2 === 'undefined' ; } if ( path2 === null ) { return file === null ; } if ( typeof path2 === 'undefined' ) { return typeof file === 'undefined' ; } //get rid of extensions and compare the names var loc = file . location ? file . location : file . Location ; if ( ! loc ) { return false ; } var idx = loc . lastIndexOf ( '.' ) ; var p1 = loc ; if ( idx > - 1 ) { p1 = loc . slice ( 0 , idx ) ; } if ( path2 === p1 ) { return true ; //could be that only the extension was missing from the other path } idx = path2 . lastIndexOf ( '.' ) ; var p2 = path2 ; if ( idx > - 1 ) { p2 = path2 . slice ( 0 , idx ) ; } if ( p1 === p2 ) { return true ; } else if ( p1 === decodeURIComponent ( p2 ) ) { return true ; } return false ; }
Returns if the two paths are the same
@param {String} file The first path
@param {String} path2 The second path
@returns {Boolean} If the paths are the same
Returns if the two paths are the same