File parentFile = directory.getParentFile(); if (null != parentFile) { File f = new File(parentFile, JGALLERYIGNOREFILE); if (f.exists())
currentParent = new StringBuffer();  if (parentlink != null)
	public void loadFolder() throws GalleryException	{		if (!isDirectoryParsed)		{			calculateParentFolderList(folderPath);			// "/testalbum/second/"			String[] parts = folderPath.split("/");			StringBuffer sb = new StringBuffer();			if (parts.length > 2) // [0] is empty, [1..n-2] are parents, [n-1]			// is current			{				for (int i = 1; i < parts.length - 1; i++)				{					level = i;					sb.append(parts[i]);					sb.append('/');				}				String parent = sb.toString();				String hTMLBase = jgalleryContextPath;				parentIndexPage = hTMLBase + "/" + parent + "index."						+ configData.urlExtention;				// Check, if parent directory is to be ignored				File parentFile = directory.getParentFile();				if (null != parentFile)				{					File f = new File(parentFile, JGALLERYIGNOREFILE);					if (f.exists())					{						parentIndexPage = "";					}				}			}			if ("".equals(parentIndexPage))			{				parentIndexPage = parentlink != null ? parentlink : ""; // set				// to				// non				// defined			}			File f = new File(directory, JGALLERYIGNOREFILE);			if (f.exists())			{				imageFiles = new String[0];			}			else			{				imageFiles = directory.list(new FilenameFilter()				{					public boolean accept(File dir, String name)					{						File f1 = new File(dir, name);						return (f1.isDirectory() && !thumbsdir.equals(name))								| isJPEGExtension(name);						// return isJPEGExtension(name);					};				});				subDirectories = getSubDirectories();			}			f = new File(directory, CAPTIONSFILE);			InputStream is = null;			try			{				is = new FileInputStream(f);				captions.load(is);			}			catch (FileNotFoundException e)			{				// ignore, no captions			}			catch (IOException e)			{				throw new GalleryException(e.getMessage(), e);			}			imageCounters = new int[imageFiles.length];			Arrays.fill(imageCounters, -1);			endLoad();		}	}