From 05d2bc10e925dfdfeb23c2246474cc8de369bf21 Mon Sep 17 00:00:00 2001 From: David McKnight Date: Wed, 31 May 2006 17:28:05 +0000 Subject: [PATCH] cache user home --- .../files/core/servicesubsystem/FileServiceSubSystem.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileServiceSubSystem.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileServiceSubSystem.java index 5ae32522497..aa9a20daa57 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileServiceSubSystem.java +++ b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileServiceSubSystem.java @@ -56,6 +56,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I protected IFileService _hostFileService; protected ISearchService _hostSearchService; protected IHostFileToRemoteFileAdapter _hostFileToRemoteFileAdapter; + protected IRemoteFile _userHome; public FileServiceSubSystem(IHost host, IConnectorService connectorService, IFileService hostFileService, IHostFileToRemoteFileAdapter fileAdapter, ISearchService searchService) { @@ -240,6 +241,10 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I */ protected IRemoteFile getUserHome() { + if (_userHome != null) + { + return _userHome; + } IRemoteFile root = getCachedRemoteFile("."); if (root != null && !root.isStale()) { return root; @@ -258,6 +263,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I } root = getHostFileToRemoteFileAdapter().convertToRemoteFile(this, getDefaultContext(), parent, userHome); cacheRemoteFile(root, "."); + _userHome = root; return root; } @@ -792,6 +798,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I { super.uninitializeSubSystem(monitor); getFileService().uninitService(monitor); + _userHome = null; } } \ No newline at end of file