* @param task task tracking.
* @return true if should continue
*/
private boolean publish(String dir, Task task ) {
task.setSubtaskName(TASK_PUBLISH_PREPARE);
ConfigSet set = settings.cp_DefaultSession.cp_Publishing;
try {
copyMedia(ucb, settings, dir,task);
copyStaticImages(ucb,settings,dir);
task.advance(true);
}
catch (Exception ex) {
//error in copying media
error(ex, "", ERROR_PUBLISH_MEDIA, ErrorHandler.ERROR_PROCESS_FATAL);
return false;
}
boolean result = true;
for (int i = 0; i < set.getSize(); i++) {
CGPublish p = (CGPublish)set.getElementAt(i);
if (p.cp_Publish) {
String key = (String)set.getKey(p);
task.setSubtaskName(key);
if (key.equals(ZIP_PUBLISHER))
fileAccess.delete(p.cp_URL);