rem: path = pathArray.join( "\\" ) + "\\"; 
add: path = pathArray.join( "\\" ); if ( path.charAt( path.length - 1 ) != '\\' ) path = path + "\\"; 
context: function getFolder( window ){	platform = getPlatform();	var path = unescape( window.location.pathname );	if ( platform == "Macintosh" )	{				// Macintosh support		if ( ( x = path.lastIndexOf( "/" ) ) > 0 )			path = path.substring( 0, x + 1 );		//var fileArray = path.split( "/" );		//var newpath = fileArray.join( ":" ) + ":";		//if ( newpath.charAt( 0 ) == ':' )		//	newpath = newpath.substring( 1, newpath.length );		newpath = path;	}	else		{										// Windows support		// note: JavaScript returns path with '/' instead of '\'		var drive = "|";		// gets the drive letter and directory path		if ( ( x = path.lastIndexOf( "|" ) ) > 0 )		{			slash = path.indexOf( '/' );			bar = path.indexOf( '|' );					if ( slash < bar )				drive = path.substring( slash + 1, bar );			else				drive = path.substring( bar - 1, bar );						path = path.substring( bar + 1, path.lastIndexOf( '/' ) + 1 );		}		var pathArray = path.split( "/" );		path = pathArray.join( "\\" ) + "\\";		//debug( "drive: " + drive + " path: " + path );		// construct newpath				newpath = drive + ":" + path;		debug( "path: " + newpath );	}	return newpath;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/fa358a30ea19a32a8ecd1a129586d929cae4ab03/util.js/buggy/cmd/dialup/as_html/util.js