[optimization] if we reload content from delegate there is no reason for separate getFileLength call

This commit is contained in:
Maxim.Mossienko
2012-05-19 01:49:44 +04:00
parent bb6c5ce8ba
commit e59b335b41
@@ -506,8 +506,8 @@ public class PersistentFS extends ManagingFS implements ApplicationComponent {
if (reloadFromDelegate) {
final NewVirtualFileSystem delegate = getDelegate(canonicalFile);
FSRecords.setLength(getFileId(canonicalFile), delegate.getLength(canonicalFile));
final byte[] content = delegate.contentsToByteArray(canonicalFile);
FSRecords.setLength(getFileId(canonicalFile), content.length);
ApplicationEx application = (ApplicationEx)ApplicationManager.getApplication();
// we should cache every local files content