mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-18 21:55:45 +02:00
[181615] Local Search throws NPE. This happens if the search is on a drive such as C:\ on Windows.
This commit is contained in:
parent
58e1c330a1
commit
dd1475a718
1 changed files with 13 additions and 2 deletions
|
@ -754,8 +754,19 @@ public class LocalFileService extends AbstractFileService implements IFileServic
|
||||||
{
|
{
|
||||||
name = name.substring(0, name.length() - ArchiveHandlerManager.VIRTUAL_SEPARATOR.length());
|
name = name.substring(0, name.length() - ArchiveHandlerManager.VIRTUAL_SEPARATOR.length());
|
||||||
}
|
}
|
||||||
boolean isVirtualParent = ArchiveHandlerManager.isVirtual(remoteParent);
|
|
||||||
boolean isArchiveParent = ArchiveHandlerManager.getInstance().isArchive(new File(remoteParent));
|
boolean isVirtualParent = false;
|
||||||
|
|
||||||
|
if (remoteParent != null) {
|
||||||
|
isVirtualParent = ArchiveHandlerManager.isVirtual(remoteParent);
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean isArchiveParent = false;
|
||||||
|
|
||||||
|
if (remoteParent != null) {
|
||||||
|
isArchiveParent = ArchiveHandlerManager.getInstance().isArchive(new File(remoteParent));
|
||||||
|
}
|
||||||
|
|
||||||
if (!isVirtualParent && !isArchiveParent)
|
if (!isVirtualParent && !isArchiveParent)
|
||||||
{
|
{
|
||||||
File file = null;
|
File file = null;
|
||||||
|
|
Loading…
Add table
Reference in a new issue