diff options
author | Henri Sara <henri.sara@itmill.com> | 2010-07-07 09:24:16 +0000 |
---|---|---|
committer | Henri Sara <henri.sara@itmill.com> | 2010-07-07 09:24:16 +0000 |
commit | 5051269fc29ac62eba17704e361cefba778ff85f (patch) | |
tree | 633bfb99d1fdf77310d73263bb47c4b6ba6450c2 /src | |
parent | c94b849df30fc3daa490726d077a8712621768ca (diff) | |
download | vaadin-framework-5051269fc29ac62eba17704e361cefba778ff85f.tar.gz vaadin-framework-5051269fc29ac62eba17704e361cefba778ff85f.zip |
#5293 WidgetsetBuilder should create directories if necessary
svn changeset:14124/svn branch:6.4
Diffstat (limited to 'src')
-rw-r--r-- | src/com/vaadin/terminal/gwt/widgetsetutils/WidgetSetBuilder.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/com/vaadin/terminal/gwt/widgetsetutils/WidgetSetBuilder.java b/src/com/vaadin/terminal/gwt/widgetsetutils/WidgetSetBuilder.java index 4b8ad76888..0609d94dc0 100644 --- a/src/com/vaadin/terminal/gwt/widgetsetutils/WidgetSetBuilder.java +++ b/src/com/vaadin/terminal/gwt/widgetsetutils/WidgetSetBuilder.java @@ -60,6 +60,14 @@ public class WidgetSetBuilder { File widgetsetFile = new File(widgetsetfilename); if (!widgetsetFile.exists()) { // create empty gwt module file + File parent = widgetsetFile.getParentFile(); + if (parent != null && !parent.exists()) { + if (!parent.mkdirs()) { + throw new IOException( + "Could not create directory for the widgetset: " + + parent.getCanonicalPath()); + } + } widgetsetFile.createNewFile(); PrintStream printStream = new PrintStream(new FileOutputStream( widgetsetFile)); |