[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[List Home]
|
[tm-cvs-commit] dmcknight org.eclipse.tm.rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/files LocalFileService.java
|
- From: Eclipse CVS Genie <genie@xxxxxxxxxxx>
- Date: Mon, 28 Feb 2011 22:28:14 +0000
- Delivered-to: tm-cvs-commit@eclipse.org
Update of /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/files
In directory dev1:/tmp/cvs-serv23701/src/org/eclipse/rse/internal/services/local/files
Modified Files:
LocalFileService.java
Log Message:
[337612] Failed to copy the content of a tar file
Index: LocalFileService.java
===================================================================
RCS file: /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/files/LocalFileService.java,v
retrieving revision 1.59
retrieving revision 1.60
diff -C2 -d -r1.59 -r1.60
*** LocalFileService.java 24 Feb 2011 16:56:12 -0000 1.59
--- LocalFileService.java 28 Feb 2011 22:28:11 -0000 1.60
***************
*** 70,73 ****
--- 70,74 ----
import java.io.OutputStreamWriter;
import java.io.UnsupportedEncodingException;
+ import java.net.URL;
import java.util.ArrayList;
import java.util.List;
***************
*** 76,79 ****
--- 77,82 ----
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
+ import org.eclipse.core.runtime.Platform;
+ import org.eclipse.osgi.service.datalocation.Location;
import org.eclipse.osgi.util.NLS;
import org.eclipse.rse.internal.services.local.Activator;
***************
*** 1400,1409 ****
private boolean isTempFile(File resource){
! String workspaceLocation = System.getProperty("osgi.instance.area");
! if (workspaceLocation != null && workspaceLocation.length() > 0){
! workspaceLocation = workspaceLocation.substring(6).replace('/', File.separatorChar);
! }
! String path = resource.getAbsolutePath();
! return (path.startsWith(workspaceLocation));
}
--- 1403,1413 ----
private boolean isTempFile(File resource){
! Location instanceLoc = Platform.getInstanceLocation();
! URL workspaceLocation = instanceLoc.getURL(); // currently, Eclipse doesn't escape URLs
!
! String wsLocation = new File(workspaceLocation.getPath()).toURI().toString();
! String fileLocation = resource.toURI().toString();
!
! return fileLocation.startsWith(wsLocation);
}