mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
This commit is contained in:
@@ -49,7 +49,7 @@ import java.util.Set;
|
||||
public class VfsRootAccess {
|
||||
private static final boolean SHOULD_PERFORM_ACCESS_CHECK = System.getenv("NO_FS_ROOTS_ACCESS_CHECK") == null;
|
||||
// we don't want test subclasses to accidentally remove allowed files, added by base classes
|
||||
private static final Set<String> ourAdditionalRoots = new THashSet<String>();
|
||||
private static final Set<String> ourAdditionalRoots = new THashSet<String>(FileUtil.PATH_HASHING_STRATEGY);
|
||||
private static boolean insideGettingRoots;
|
||||
|
||||
@TestOnly
|
||||
@@ -109,7 +109,7 @@ public class VfsRootAccess {
|
||||
Project[] openProjects = ProjectManager.getInstance().getOpenProjects();
|
||||
if (openProjects.length == 0) return null;
|
||||
|
||||
final Set<String> allowed = new THashSet<String>();
|
||||
final Set<String> allowed = new THashSet<String>(FileUtil.PATH_HASHING_STRATEGY);
|
||||
allowed.add(FileUtil.toSystemIndependentName(PathManager.getHomePath()));
|
||||
|
||||
try {
|
||||
|
||||
+1
-1
@@ -185,7 +185,7 @@ public class CodeInsightTestFixtureImpl extends BaseFixture implements CodeInsig
|
||||
}
|
||||
|
||||
VirtualFile result;
|
||||
final String path = fromFile.getPath();
|
||||
final String path = fromFile.getAbsolutePath();
|
||||
if (myTempDirFixture instanceof LightTempDirTestFixtureImpl) {
|
||||
VfsRootAccess.allowRootAccess(path);
|
||||
Disposer.register(myTestRootDisposable, new Disposable() {
|
||||
|
||||
Reference in New Issue
Block a user