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

fix for 158771. Miner needs to handle get remote object command for directories and files (not just filters)

This commit is contained in:
David McKnight 2006-09-26 16:07:23 +00:00
parent 2a2d134440
commit ae1210c41f

View file

@ -1530,7 +1530,8 @@ private DataElement createDataElementFromLSString(DataElement subject,
File fileobj = null;
boolean isVirtual = false;
String fullName = subject.getValue();
if (queryType.equals(UNIVERSAL_FILTER_DESCRIPTOR)) {
if (queryType.equals(UNIVERSAL_FILTER_DESCRIPTOR))
{
isVirtual = ArchiveHandlerManager.isVirtual(fullName);
String filterValue = subject.getValue();
// . translates to home dir
@ -1541,7 +1542,27 @@ private DataElement createDataElementFromLSString(DataElement subject,
}
if (!isVirtual)
fileobj = new File(filterValue);
} else {
}
else if (queryType.equals(UNIVERSAL_FILE_DESCRIPTOR))
{
String name = subject.getName();
String path = subject.getValue();
fileobj = new File(path, name);
}
else if (queryType.equals(UNIVERSAL_FOLDER_DESCRIPTOR))
{
String name = subject.getName();
String path = subject.getValue();
if (name.length() == 0)
{
fileobj = new File(path);
}
else
{
fileobj = new File(path, name);
}
}
else {
UniversalServerUtilities.logError(CLASSNAME,
"Invalid query type to handleQueryGetRemoteObject", null);
return statusDone(status);
@ -1585,6 +1606,8 @@ private DataElement createDataElementFromLSString(DataElement subject,
// DKM - do basic property stuff here
subject.setAttribute(DE.A_SOURCE, setProperties(fileobj));
System.out.println("got file:");
System.out.println(subject);
/*
// classify the file too