[Schmitzm-commits] r1063 - branches/2.2.x/src/schmitzm/io
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Sat Sep 25 19:07:25 CEST 2010
Author: alfonx
Date: 2010-09-25 19:07:25 +0200 (Sat, 25 Sep 2010)
New Revision: 1063
Modified:
branches/2.2.x/src/schmitzm/io/IOUtil.java
Log:
Improved temp path fallbacks if the temp dir can not be found
Modified: branches/2.2.x/src/schmitzm/io/IOUtil.java
===================================================================
--- branches/2.2.x/src/schmitzm/io/IOUtil.java 2010-09-25 15:06:14 UTC (rev 1062)
+++ branches/2.2.x/src/schmitzm/io/IOUtil.java 2010-09-25 17:07:25 UTC (rev 1063)
@@ -39,6 +39,7 @@
import java.net.MalformedURLException;
import java.net.URL;
+import org.apache.commons.lang.SystemUtils;
import org.apache.log4j.Logger;
/**
@@ -662,8 +663,13 @@
if (tempPath == null || tempPath.isEmpty()
|| !new File(tempPath).exists()) {
- LOGGER.warn("Temporary directory can't be found. Using /tmp");
- tempPath = "/tmp";
+
+ if (SystemUtils.IS_OS_WINDOWS) {
+ tempPath = "C:\tmp";
+ } else {
+ tempPath = "/tmp";
+ }
+ LOGGER.warn("Temporary directory can't be found. Using '"+tempPath+"'");
}
while (tempPath.endsWith(File.separator))
More information about the Schmitzm-commits
mailing list