VirtualFileSystem#refreshAndFindFileByPath does not find UNC file

I have a pice of code that worked OK in IntelliJ 5.

*String s = file.getAbsolutePath();

final String s1 = s.replace(File.separatorChar, '/');
final VirtualFile[] virtualfiles = new VirtualFile[1];

ApplicationManager.getApplication().runWriteAction(new Runnable() {

public void run() {
virtualfiles[0] = LocalFileSystem.getInstanc().refreshAndFindFileByPath(s1);

if ( virtualfiles[0] != null ) {
virtualfiles[0].refresh(false, false);


The file in question has UNC path, for example://wf705mc/D/Runtime/Log/Main_0.log

In intelliJ 5.x this code worked fine.
In IntelliJ 6.x refreshAndFindFileByPath(s1) return null. If the path is not UNC then this code works fine in 6.x too.

Please HELP

Comment actions Permalink

Well, this piece of code DID work on IntelliJ 5.x ? So what changed ? can you put some light on this ?

Is any other way i can open UNC file in editor ? This is important to out project, because these files contains exceptions we need to analyse.



Please sign in to leave a comment.