Hi

--list-styles just list style 2 times
Time started: Mon Mar 24 13:25:48 CET 2014
The following styles are available:
s       1.1: s
s       1.1: s

Is it possible to make it ignore at least dot files?

A style is required to have a 'version' file and there is no
check for one. Seems like any two directories cause a problem
although I'm not entirely sure why.

Attached is a patch to check for the required version file.

..Steve

Index: src/uk/me/parabola/mkgmap/osmstyle/DirectoryFileLoader.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/uk/me/parabola/mkgmap/osmstyle/DirectoryFileLoader.java	(revision 3122)
+++ src/uk/me/parabola/mkgmap/osmstyle/DirectoryFileLoader.java	(revision )
@@ -18,11 +18,11 @@
 
 import java.io.BufferedReader;
 import java.io.File;
+import java.io.FileInputStream;
 import java.io.FileNotFoundException;
 import java.io.InputStreamReader;
-import java.io.FileInputStream;
-import java.io.UnsupportedEncodingException;
 import java.io.Reader;
+import java.io.UnsupportedEncodingException;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -78,10 +78,14 @@
 		List<String> res = new ArrayList<String>();
 
 		File[] allFiles = dir.listFiles();
+		if (allFiles != null) {
-		for (File file : allFiles) {
-			log.debug("dir loader", file);
-			if (file.isDirectory()) {
+			for (File file : allFiles) {
+				log.debug("dir loader", file);
+				if (file.isDirectory()) {
+					File style = new File(file, "version");
+					if (style.exists())
-				res.add(file.getName());
+						res.add(file.getName());
+				}
 			}
 		}
 
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Reply via email to