Changeset 10207
- Timestamp:
- 2005-07-05T12:21:25+12:00 (19 years ago)
- Location:
- trunk/gli/src/org/greenstone/gatherer
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/GathererApplet.java
r10010 r10207 109 109 File gli_user_directory = Utility.setGLIUserFolder(windows_home); 110 110 if (!gli_user_directory.exists()) { 111 gli_user_directory.mkdirs(); 111 if (!gli_user_directory.mkdirs()) { 112 System.err.println("Warning: Unable to make directory: " + gli_user_directory.toString()); 113 } 112 114 } 113 115 … … 165 167 else { 166 168 // Prepare an empty collect dir for general use 167 col_dir.mkdir(); 169 if (!col_dir.mkdir()) { 170 System.err.println("Warning: Unable to make directory: " + col_dir.toString()); 171 } 168 172 } 169 173 } … … 172 176 File tmp_dir = new File(Utility.TMP_DIR); 173 177 if (!tmp_dir.exists()) { 174 tmp_dir.mkdir(); 178 if (!tmp_dir.mkdir()) { 179 System.err.println("Warning: Unable to make directory: " + tmp_dir.toString()); 180 } 175 181 176 182 String username = System.getProperty("user.name"); … … 178 184 File user_tmp_dir = new File(Utility.TMP_DIR + File.separator + username); 179 185 if (!user_tmp_dir.exists()) { 180 user_tmp_dir.mkdir(); 186 if (!user_tmp_dir.mkdir()) { 187 System.err.println("Warning: Unable to make directory: " + user_tmp_dir.toString()); 188 } 181 189 } 182 190 } -
trunk/gli/src/org/greenstone/gatherer/util/Unzip.java
r9314 r10207 70 70 71 71 String gsdl_home = args[0]; 72 73 if (!gsdl_home.endsWith(File.separator)) { 74 gsdl_home += File.separator; 75 } 76 72 77 String col_dir = gsdl_home + "collect" + File.separator; 73 78 79 String zip_fname = args[1]; 80 74 81 try { 75 zipFile = new ZipFile( args[1]);82 zipFile = new ZipFile(zip_fname); 76 83 77 84 entries = zipFile.entries(); … … 102 109 zipFile.close(); 103 110 } 111 catch (ZipException error) { 112 System.err.println("Error: Unable to open '"+zip_fname+"'"); 113 System.err.println("This maybe caused by the zip file being empty."); 114 error.printStackTrace(); 115 } 116 104 117 catch (IOException ioe) { 105 System.err.println("Unhandled exception on " + args[1]);118 System.err.println("Unhandled exception on " + gsdl_home + " " + zip_fname); 106 119 ioe.printStackTrace(); 107 120 return; 108 121 } 122 123 catch (Exception error) { 124 error.printStackTrace(); 125 } 109 126 } 110 127 } -
trunk/gli/src/org/greenstone/gatherer/util/Utility.java
r10013 r10207 689 689 int prefix_strip = col_dir.length(); 690 690 boolean encountered_file = false; 691 691 692 692 String zip_fname = col_dir + col_name + ".zip"; 693 693 String zip_dir_or_file = col_dir + col_name + File.separator + dir_or_file; … … 751 751 try { 752 752 File cfile = new File(zip_fname); 753 System.err.println("**** zip fname = " + cfile.toString()); 754 753 755 ZipFile zipfile = new ZipFile(cfile, zip_mode); 754 756
Note:
See TracChangeset
for help on using the changeset viewer.