1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-09-02 05:03:36 +02:00

Bug 314496 - [efs] symbolic links do not report a proper EFS.ATTRIBUTE_LINK_TARGET

This commit is contained in:
Martin Oberhuber 2010-05-26 18:33:13 +00:00
parent 61650e40e5
commit c4a073e7d2
2 changed files with 17 additions and 10 deletions

View file

@ -26,7 +26,7 @@ plugin@org.eclipse.rse.core=v201003151933,:pserver:anonymous:none@dev.eclipse.or
plugin@org.eclipse.rse.doc.isv=v201005221130,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/doc/org.eclipse.rse.doc.isv
plugin@org.eclipse.rse.doc.user=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/doc/org.eclipse.rse.doc.user
plugin@org.eclipse.rse.dstore.security=v201003010830,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.dstore.security
plugin@org.eclipse.rse.efs=v201003010830,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.efs
plugin@org.eclipse.rse.efs=v201005261830,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.efs
plugin@org.eclipse.rse.efs.ui=v201003010830,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.efs.ui
plugin@org.eclipse.rse.examples.daytime=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/examples/org.eclipse.rse.examples.daytime
plugin@org.eclipse.rse.examples.tutorial=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/examples/org.eclipse.rse.examples.tutorial

View file

@ -34,6 +34,7 @@
* David McKnight (IBM) - [287185] EFS provider should interpret the URL host component as RSE connection name rather than a hostname
* David McKnight (IBM) - [291738] [efs] repeated queries to RSEFileStoreImpl.fetchInfo() in short time-span should be reduced
* Szymon Brandys (IBM) - [303092] [efs] RSE portion to deal with FileSystemResourceManager makes second call to efs provider on exception due to cancel
* Martin Oberhuber (Wind River) - [314496] [efs] Symlink target not reported
********************************************************************************/
package org.eclipse.rse.internal.efs;
@ -549,20 +550,26 @@ public class RSEFileStoreImpl extends FileStore
String classification = (remoteFile==null) ? null : remoteFile.getClassification();
FileInfo info = new FileInfo(_store.getName());
if (remoteFile == null || !remoteFile.exists()) {
if (remoteFile == null) {
info.setExists(false);
return info;
}
if (classification!=null && classification.startsWith("broken symbolic link")) { //$NON-NLS-1$
//broken symbolic link handling
if (classification!=null && classification.startsWith("broken symbolic link")) { //$NON-NLS-1$
info.setAttribute(EFS.ATTRIBUTE_SYMLINK, true);
int i1 = classification.indexOf('\'');
if (i1>0) {
int i2 = classification.indexOf('´');
if (i2>i1) {
info.setStringAttribute(EFS.ATTRIBUTE_LINK_TARGET, classification.substring(i1+1,i2));
}
info.setExists(false);
info.setLastModified(remoteFile.getLastModified());
info.setAttribute(EFS.ATTRIBUTE_SYMLINK, true);
int i1 = classification.indexOf('`');
if (i1>0) {
int i2 = classification.indexOf('\'');
if (i2>i1) {
info.setStringAttribute(EFS.ATTRIBUTE_LINK_TARGET, classification.substring(i1+1,i2));
}
}
return info;
} else if (!remoteFile.exists()) {
info.setExists(false);
return info;
}
info.setExists(true);