mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-09 10:05:24 +02:00
fix for Bug 161936
This commit is contained in:
parent
962e32e92c
commit
a1cc2c6641
3 changed files with 14 additions and 4 deletions
|
@ -149,6 +149,7 @@ public abstract class AbstractDStoreService implements IDStoreService
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return new DataElement[0];
|
return new DataElement[0];
|
||||||
|
|
|
@ -53,6 +53,10 @@ public class DStoreHostFile implements IHostFile
|
||||||
public static String getNameFromPath(String path)
|
public static String getNameFromPath(String path)
|
||||||
{
|
{
|
||||||
int lastSlash = path.lastIndexOf('/');
|
int lastSlash = path.lastIndexOf('/');
|
||||||
|
if (lastSlash == -1) // account for windows
|
||||||
|
{
|
||||||
|
lastSlash = path.lastIndexOf('\\');
|
||||||
|
}
|
||||||
if (lastSlash > 0 && lastSlash != path.length() - 1)
|
if (lastSlash > 0 && lastSlash != path.length() - 1)
|
||||||
{
|
{
|
||||||
return path.substring(lastSlash);
|
return path.substring(lastSlash);
|
||||||
|
@ -63,6 +67,10 @@ public class DStoreHostFile implements IHostFile
|
||||||
public static String getParentPathFromPath(String path)
|
public static String getParentPathFromPath(String path)
|
||||||
{
|
{
|
||||||
int lastSlash = path.lastIndexOf('/');
|
int lastSlash = path.lastIndexOf('/');
|
||||||
|
if (lastSlash == -1) // acount for windows
|
||||||
|
{
|
||||||
|
lastSlash = path.lastIndexOf('\\');
|
||||||
|
}
|
||||||
if (lastSlash > 0 && lastSlash != path.length() - 1)
|
if (lastSlash > 0 && lastSlash != path.length() - 1)
|
||||||
{
|
{
|
||||||
return path.substring(0, lastSlash);
|
return path.substring(0, lastSlash);
|
||||||
|
|
|
@ -699,17 +699,18 @@ public abstract class SubSystem extends RSEModelObject implements IAdaptable, IS
|
||||||
if (filter.isPromptable() || !doesFilterTypeMatch(filter, remoteObjectAbsoluteName))
|
if (filter.isPromptable() || !doesFilterTypeMatch(filter, remoteObjectAbsoluteName))
|
||||||
return false;
|
return false;
|
||||||
boolean would = false;
|
boolean would = false;
|
||||||
ISystemFilterString[] strings = filter.getSystemFilterStrings();
|
|
||||||
|
String[] strings = filter.getFilterStrings();
|
||||||
if (strings != null)
|
if (strings != null)
|
||||||
{
|
{
|
||||||
for (int idx=0; !would && (idx<strings.length); idx++)
|
for (int idx=0; !would && (idx<strings.length); idx++)
|
||||||
{
|
{
|
||||||
if (strings[idx].getString().equals("*"))
|
if (strings[idx].equals("*"))
|
||||||
would = true;
|
would = true;
|
||||||
else if (strings[idx].getString().equals("./*"))
|
else if (strings[idx].equals("./*"))
|
||||||
would = true;
|
would = true;
|
||||||
else
|
else
|
||||||
would = doesFilterStringMatch(strings[idx].getString(), remoteObjectAbsoluteName, strings[idx].getParentSystemFilter().areStringsCaseSensitive());
|
would = doesFilterStringMatch(strings[idx], remoteObjectAbsoluteName, filter.areStringsCaseSensitive());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return would;
|
return would;
|
||||||
|
|
Loading…
Add table
Reference in a new issue