# HG changeset patch # User moser@PIP2.pp.biotechnikum.de # Date 1204188956 -3600 # Node ID ff4322b74d5af7e3699d0277ffdce361a893f5b7 # Parent a270a27e41edf0579ff0da1c6357f0f864a21583 fixed wrong paths to image resources diff -r a270a27e41ed -r ff4322b74d5a tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/translators/HtmlExportFormat.java --- a/tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/translators/HtmlExportFormat.java Wed Feb 27 15:13:13 2008 +0100 +++ b/tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/translators/HtmlExportFormat.java Thu Feb 28 09:55:56 2008 +0100 @@ -89,16 +89,21 @@ private static void copyResourceToFile(String from, File to) throws IOException { InputStream is = TextExportFormat.class.getResourceAsStream(from); - try { - OutputStream os = new FileOutputStream(to); - try { - UTUtils.copyStream(is, os); - } finally { - os.close(); - } - } finally { - is.close(); + if (is != null) { + try { + OutputStream os = new FileOutputStream(to); + try { + UTUtils.copyStream(is, os); + } finally { + os.close(); + } + } finally { + is.close(); + } } + else { + UTUtils.LOGGER.log(Level.SEVERE, "Could not find resource \"" + from + "\""); + } } private String res = "usertasks-effort-html.xsl"; // NOI18N @@ -215,10 +220,10 @@ super.doExportImport(provider, wd); try { copyResourceToFile( - "/org/netbeans/modules/tasklist/core/task.gif", // NOI18N + "/org/netbeans/modules/tasklist/usertasks/task.gif", // NOI18N new File(dir, "undone.gif")); // NOI18N copyResourceToFile( - "/org/netbeans/modules/tasklist/core/doneItem.gif", // NOI18N + "/org/netbeans/modules/tasklist/usertasks/doneItem.gif", // NOI18N new File(dir, "done.gif")); // NOI18N } catch (IOException ex) { NotifyDescriptor nd = new NotifyDescriptor.Message(ex.getMessage(),