int p = title.lastIndexOf('/'); if (p>-1) { name = title.substring(p+1); } else { name = title; }
	protected void endLoad() throws GalleryException	{		imagesArray = new Image[imageFiles.length];		// if sorting is wished for, need to load all images first		// and sort them		if (sortingOrder != ImageComparator.SORTNONE)		{			for (int i = 0; i < imageFiles.length; i++)			{				getImage(i + 1);			}			Comparator c = new ImageComparator(sortingOrder);			Arrays.sort(imagesArray, c);			for (int i = 0; i < imageFiles.length; i++)			{				imageFiles[i] = imagesArray[i].getFileName();			}		}		for (int i = 0; i < imageFiles.length; i++)		{			images.put(imageFiles[i].substring(0, imageFiles[i].indexOf('.')),					new Integer(i + 1));		}		calculateVariables();		isDirectoryParsed = true;		title = folderPath.substring(folderPath.indexOf('/') + 1);		if (title.endsWith("/"))		{			title = title.substring(0, title.lastIndexOf('/'));		}	}