diff --git a/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/persistent/PersistentFS.java b/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/persistent/PersistentFS.java index c352f2e2908e..613a2f188726 100644 --- a/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/persistent/PersistentFS.java +++ b/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/persistent/PersistentFS.java @@ -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