Author: ross.gardler
Date: Sun Sep 7 14:48:23 2008
New Revision: 1283
Modified:
trunk/uk.ac.osswatch.simal.web/src/main/java/uk/ac/osswatch/simal/wicket/doap/ExhibitProjectBrowserPage.java
Log:
Windows returns a trailing separator on java.io.tmpdir, Linux does not
(thank heavens for continuous integration)
Modified:
trunk/uk.ac.osswatch.simal.web/src/main/java/uk/ac/osswatch/simal/wicket/doap/ExhibitProjectBrowserPage.java
==============================================================================
---
trunk/uk.ac.osswatch.simal.web/src/main/java/uk/ac/osswatch/simal/wicket/doap/ExhibitProjectBrowserPage.java
(original)
+++
trunk/uk.ac.osswatch.simal.web/src/main/java/uk/ac/osswatch/simal/wicket/doap/ExhibitProjectBrowserPage.java
Sun Sep 7 14:48:23 2008
@@ -48,7 +48,12 @@
String dir = System.getProperty("java.io.tmpdir");
logger.debug("Temporary JSON file will be saved in {}", dir);
try {
- File outFile = new File(dir + "projects.js");
+ StringBuilder filePath = new StringBuilder(dir);
+ if (!dir.endsWith(File.separator)) {
+ filePath.append(File.separator);
+ }
+ filePath.append("projects.js");
+ File outFile = new File(filePath.toString());
FileWriter out = new FileWriter(outFile);
out.write(UserApplication.getRepository().getAllProjectsAsJSON());
out.close();
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Simal Commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/simal-commits?hl=en
-~----------~----~----~----~------~----~------~--~---