IDEA-298522 Invalid file from ContentEntryBridge .getExcludeFolderFiles

GitOrigin-RevId: 9dc8c69c5b97dde898b4b9548cc4b1cbc7d22aba
This commit is contained in:
Elena Shaverdova
2022-07-25 14:39:40 +00:00
committed by intellij-monorepo-bot
parent f4f03fc614
commit d472e40b99
@@ -1,18 +1,4 @@
/*
* Copyright 2000-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.openapi.vfs.impl;
import com.intellij.openapi.application.ApplicationManager;
@@ -66,7 +52,8 @@ class VirtualFilePointerImpl extends TraceableDisposable implements VirtualFileP
public VirtualFile getFile() {
FilePartNode node = checkDisposed(myNode);
if (node == null) return null;
return FilePartNode.myFile(node.myFileOrUrl);
VirtualFile file = FilePartNode.myFile(node.myFileOrUrl);
return (file != null && file.isValid()) ? file : null;
}
@Override