new File(backupDirectory).mkdirs();
backupDirectory = MiscUtilities.concatPath( backupDirectory,file.getPath());  File dir = new File(backupDirectory);  if (!dir.exists()) dir.mkdirs();
	private void backup(Buffer buffer, File file)	{		if(buffer.getProperty(BACKED_UP_PROPERTY) != null)			return;		buffer.putProperty(BACKED_UP_PROPERTY,Boolean.TRUE);				// Fetch properties		int backups;		try		{			backups = Integer.parseInt(jEdit.getProperty(				"backups"));		}		catch(NumberFormatException nf)		{			Log.log(Log.ERROR,this,nf);			backups = 1;		}		if(backups == 0)			return;		String backupPrefix = jEdit.getProperty("backup.prefix","");		String backupSuffix = jEdit.getProperty("backup.suffix","~");		// Check for backup.directory property, and create that		// directory if it doesn't exist		String backupDirectory = jEdit.getProperty("backup.directory");		if(backupDirectory == null || backupDirectory.length() == 0)			backupDirectory = file.getParent();		else		{			backupDirectory = MiscUtilities.constructPath(				System.getProperty("user.home"),backupDirectory);			new File(backupDirectory).mkdirs();		}				String name = file.getName();		// If backups is 1, create ~ file		if(backups == 1)		{			file.renameTo(new File(backupDirectory,				backupPrefix + name + backupSuffix));		}		// If backups > 1, move old ~n~ files, create ~1~ file		else		{			new File(backupDirectory,				backupPrefix + name + backupSuffix				+ backups + backupSuffix).delete();			for(int i = backups - 1; i > 0; i--)			{				File backup = new File(backupDirectory,					backupPrefix + name + backupSuffix					+ i + backupSuffix);				backup.renameTo(new File(backupDirectory,					backupPrefix + name + backupSuffix					+ (i+1) + backupSuffix));			}			file.renameTo(new File(backupDirectory,				backupPrefix + name + backupSuffix				+ "1" + backupSuffix));		}	}