Changeset 9209
- Timestamp:
- 2005-02-28T14:50:03+13:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/util/Utility.java
r9202 r9209 137 137 static public boolean delete(File file) 138 138 { 139 // Nothing to do if it doesn't exist 140 if (!file.exists()) { 141 return true; 142 } 143 139 144 // If file is a directory, we have to recursively delete its contents first 140 145 if (file.isDirectory()) { … … 558 563 559 564 if (zipentry.isDirectory()) { 560 // Create named directory 561 boolean success = (new File(zentryname)).mkdir();562 if (! success) {563 System.err.println("Error: unable to create directory '"+zentryname+"'");565 // Create named directory, if it doesn't already exist 566 File zip_entry_file = new File(zentryname); 567 if (!zip_entry_file.exists() && !zip_entry_file.mkdirs()) { 568 System.err.println("Error: unable to create directory " + zip_entry_file); 564 569 } 565 570 } … … 843 848 844 849 if (zipentry.isDirectory()) { 845 if(!file.exists()) { 846 // Create named directory, if it doesn't already exist. 847 boolean success = (file.mkdir()); 848 if (!success) { 849 System.err.println("Error: unable to create directory '"+zentryname+"'"); 850 } 850 // Create named directory, if it doesn't already exist 851 if (!file.exists() && !file.mkdirs()) { 852 System.err.println("Error: unable to create directory " + file); 851 853 } 852 854 }
Note:
See TracChangeset
for help on using the changeset viewer.