[lsc-changes] r307 - lsc/trunk/src/main/java/org/lsc

jclarke at lsc-project.org jclarke at lsc-project.org
Tue Jul 21 17:03:37 CEST 2009


Author: jclarke
Date: 2009-07-21 17:03:37 +0200 (Tue, 21 Jul 2009)
New Revision: 307

Modified:
   lsc/trunk/src/main/java/org/lsc/Configuration.java
Log:
Merging revision 306 into trunk

Modified: lsc/trunk/src/main/java/org/lsc/Configuration.java
===================================================================
--- lsc/trunk/src/main/java/org/lsc/Configuration.java	2009-07-21 15:01:44 UTC (rev 306)
+++ lsc/trunk/src/main/java/org/lsc/Configuration.java	2009-07-21 15:03:37 UTC (rev 307)
@@ -271,6 +271,7 @@
 	 *            the user defined location
 	 */
 	public static void setLocation(String configurationLocation) {
+		configurationLocation = cleanup(configurationLocation);
 		location = appendDirSeparator(configurationLocation);
 	}
 	
@@ -281,6 +282,15 @@
 		return path;
 	}
 
+	private static String cleanup(String path) {
+		String ret = path.trim();
+		if (ret.charAt(0) == '\'' && ret.charAt(ret.length()-1) == '\'')
+		{
+			ret = ret.substring(1, ret.length() - 1);
+		}
+		return ret;
+	}
+	
 	/**
 	 * Get the path to the directory where configuration files
 	 * are stored, with a "/" at the end (or "\" on Windows).


Property changes on: lsc/trunk/src/main/java/org/lsc/Configuration.java
___________________________________________________________________
Added: svn:mergeinfo
   + /lsc/branches/v1.1/src/main/java/org/lsc/Configuration.java:306



More information about the lsc-changes mailing list