String directory;  if(files.length == 1 && files[0].type == VFS.DirectoryEntry.DIRECTORY) directory = files[0].path; else directory = browser.getDirectory();
String directory = browser.getDirectory();
	public void ok()	{		VFS.DirectoryEntry[] files = browser.getSelectedFiles();		if(files.length == 0)		{			String directory;			if(files.length == 1 && files[0].type == VFS.DirectoryEntry.DIRECTORY)				directory = files[0].path;			else				directory = browser.getDirectory();			filename = filenameField.getText();			if(filename.length() == 0)			{				getToolkit().beep();				return;			}			else			{				VFS vfs = VFSManager.getVFSForPath(directory);				filename = vfs.constructPath(directory,filename);				if(browser.getMode() == VFSBrowser.SAVE_DIALOG)				{					if(vfs instanceof FileVFS && doFileExistsWarning(filename))						return;				}			}		}		else		{			for(int i = 0; i < files.length; i++)			{				VFS.DirectoryEntry file = files[i];				if(file.type == VFS.DirectoryEntry.FILESYSTEM					|| file.type == VFS.DirectoryEntry.DIRECTORY)				{					browser.setDirectory(file.path);					return;				}			}		}		isOK = true;		dispose();	}