This means your preferences will be considered corrupt whenever you
switch from the upstream version to the debian package or vice versa.
As one of the JOSM developers, I find this quite unfortunate. Here is a
suggested fix: Instead of replacing the "resource://" URLs in the source
code directly [1], change the way these URLs are retrieved: First check
the /usr/share/josm directory, then inside the jar. Patch attached
(untested).
[1]
<http://anonscm.debian.org/gitweb/?p=pkg-osm/josm.git;a=commitdiff;h=2a1def7a69795a9d8670dfb387da49acf33fbe5c>
Index: src/org/openstreetmap/josm/io/MirroredInputStream.java
===================================================================
--- src/org/openstreetmap/josm/io/MirroredInputStream.java (revision 5778)
+++ src/org/openstreetmap/josm/io/MirroredInputStream.java (working copy)
@@ -81,13 +81,21 @@
}
} catch (java.net.MalformedURLException e) {
if (name.startsWith("resource://")) {
- fs = getClass().getResourceAsStream(
- name.substring("resource:/".length()));
- if (fs == null)
- throw new IOException(tr("Failed to open input stream for resource ''{0}''", name));
- return;
+ String path = name.substring("resource://".length());
+ File fileRes = new File("/usr/share/josm/" + path);
+ if (fileRes.exists()) {
+ file = fileRes;
+ } else {
+ fs = getClass().getResourceAsStream(
+ name.substring("resource:/".length()));
+ if (fs == null)
+ throw new IOException(tr("Failed to open input stream for resource ''{0}''", name));
+ return;
+ }
}
- file = new File(name);
+ if (file == null) {
+ file = new File(name);
+ }
}
if (file == null)
throw new IOException();
_______________________________________________
Pkg-osm-maint mailing list
Pkg-osm-maint@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-osm-maint