[platform] corrupted paths tolerance in VFS (EA-89728)

This commit is contained in:
Roman Shevchenko
2016-10-12 11:33:20 +02:00
parent 925e262158
commit 38c23997b3
@@ -860,19 +860,22 @@ public class PersistentFSImpl extends PersistentFS implements ApplicationCompone
canonicalBasePath = basePath;
}
FileAttributes attributes = fs.getAttributes(new StubVirtualFile() {
@NotNull
@Override
public String getPath() {
return canonicalBasePath;
}
FileAttributes attributes;
try {
attributes = fs.getAttributes(new StubVirtualFile() {
@NotNull
@Override
public String getPath() { return canonicalBasePath; }
@Nullable
@Override
public VirtualFile getParent() {
return null;
}
});
@Nullable
@Override
public VirtualFile getParent() { return null; }
});
}
catch (RuntimeException | AssertionError e) {
LOG.error(e);
return null;
}
if (attributes == null || !attributes.isDirectory()) {
return null;
}