Alexey Kudravtsev
2014-09-02 15:27:57 +04:00
parent 2bc3f7a024
commit d647c7e1ce
2 changed files with 3 additions and 3 deletions
@@ -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 {
@@ -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() {