1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-04 15:45:25 +02:00

[199132] fix: [Archives-TAR][Local-Windows] Can't open files in tar archives

This commit is contained in:
Xuan Chen 2007-08-14 05:02:57 +00:00
parent 69bf47f7ae
commit c8b3a085c5

View file

@ -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 @@ public class SystemTarHandler implements ISystemArchiveHandler {
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 class SystemTarHandler implements ISystemArchiveHandler {
}
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) {