Index: lams_common/build.xml =================================================================== RCS file: /usr/local/cvsroot/lams_common/build.xml,v diff -u -r1.43 -r1.44 --- lams_common/build.xml 11 May 2006 11:07:52 -0000 1.43 +++ lams_common/build.xml 15 Jun 2006 06:35:33 -0000 1.44 @@ -210,7 +210,7 @@ - + Index: lams_common/src/java/org/lamsfoundation/lams/util/FileUtil.java =================================================================== RCS file: /usr/local/cvsroot/lams_common/src/java/org/lamsfoundation/lams/util/FileUtil.java,v diff -u -r1.14 -r1.15 --- lams_common/src/java/org/lamsfoundation/lams/util/FileUtil.java 15 Jun 2006 05:49:23 -0000 1.14 +++ lams_common/src/java/org/lamsfoundation/lams/util/FileUtil.java 15 Jun 2006 06:35:33 -0000 1.15 @@ -344,12 +344,17 @@ fullpath = path + file; else fullpath = path + File.separator + file; + + return makeCanonicalPath(fullpath); + + } + + public static String makeCanonicalPath(String pathfile){ if(File.separator.indexOf("\\") != -1) - fullpath = fullpath.replaceAll("\\/","\\\\"); + pathfile = pathfile.replaceAll("\\/","\\\\"); else - fullpath = fullpath.replaceAll("\\\\",File.separator); + pathfile = pathfile.replaceAll("\\\\",File.separator); - return fullpath; - + return pathfile; } } Index: lams_common/src/java/org/lamsfoundation/lams/util/zipfile/ZipFileUtil.java =================================================================== RCS file: /usr/local/cvsroot/lams_common/src/java/org/lamsfoundation/lams/util/zipfile/ZipFileUtil.java,v diff -u -r1.8 -r1.9 --- lams_common/src/java/org/lamsfoundation/lams/util/zipfile/ZipFileUtil.java 3 Apr 2006 23:36:55 -0000 1.8 +++ lams_common/src/java/org/lamsfoundation/lams/util/zipfile/ZipFileUtil.java 15 Jun 2006 06:35:33 -0000 1.9 @@ -175,10 +175,15 @@ * @param destName */ private static void prepareDirectory(String destName) { + //It must sort out the directory information to current OS. + //e.g, if zip file is zipped under windows, but unzip in linux. + destName = FileUtil.makeCanonicalPath(destName); File destNameFile = new File(destName); String path = destNameFile.getParent(); - File pathDir = new File(path); - pathDir.mkdirs(); + if(path != null){ + File pathDir = new File(path); + pathDir.mkdirs(); + } } /** Delete a temporary directory.