### Eclipse Workspace Patch 1.0 #P org.eclipse.rse.services Index: clientserver/org/eclipse/rse/services/clientserver/archiveutils/SystemTarHandler.java =================================================================== RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/SystemTarHandler.java,v retrieving revision 1.5 diff -u -r1.5 SystemTarHandler.java --- clientserver/org/eclipse/rse/services/clientserver/archiveutils/SystemTarHandler.java 12 Jul 2007 20:55:52 -0000 1.5 +++ clientserver/org/eclipse/rse/services/clientserver/archiveutils/SystemTarHandler.java 14 Aug 2007 04:48:55 -0000 @@ -14,6 +14,7 @@ * Contributors: * {Name} (company) - description of contribution. * Xuan Chen (IBM) - [194293] [Local][Archives] Saving file second time in an Archive Errors + * Xuan Chen (IBM) - [199132] [Archives-TAR][Local-Windows] Can't open files in tar archives *******************************************************************************/ package org.eclipse.rse.services.clientserver.archiveutils; @@ -870,6 +871,14 @@ destination.setLastModified(entry.getModificationTime()); return false; // TODO: return true or false? } + //Need to make sure destination file exists. + if (!destination.exists()) + { + File parentFile = destination.getParentFile(); + if (!parentFile.exists()) + parentFile.mkdirs(); + destination.createNewFile(); + } outStream = new FileOutputStream(destination); @@ -2248,8 +2257,7 @@ } public boolean add(File file, String virtualPath, String name, String sourceEncoding, String targetEncoding, ISystemFileTypes typeRegistery) { - // TODO Auto-generated method stub - return false; + return add(file, virtualPath, name); } public boolean replace(String fullVirtualName, InputStream stream, String name, String sourceEncoding, String targetEncoding, boolean isText) {