@@ -73,8 +73,6 @@ public class HubUVFVault extends UVFVault {
7373 * Storage connection only available after loading vault
7474 */
7575 private final Session <?> storage ;
76-
77- private final Path home ;
7876 private final LoginCallback login ;
7977
8078 /**
@@ -91,7 +89,6 @@ public HubUVFVault(final Protocol profile, final UUID vaultId, final Path bucket
9189 super (bucket );
9290 this .vaultId = vaultId ;
9391 this .vaultMetadata = vaultMetadata ;
94- this .home = bucket ;
9592 this .login = prompt ;
9693 final VaultMetadataJWEBackendDto vaultStorageMetadata = vaultMetadata .storage ();
9794 final HubSession hub = profile .getFeature (HubSession .class );
@@ -185,6 +182,7 @@ public Path create(final Session<?> session, final String region, final VaultCre
185182 }
186183 else { // Obsolete when implemented in super
187184 final Directory <?> directory = (Directory <?>) storage ._getFeature (Directory .class );
185+ final Path home = this .getHome ();
188186 log .debug ("Create vault root directory at {}" , home );
189187 final TransferStatus status = (new TransferStatus ()).setRegion (HubStorageLocationService .StorageLocation .fromIdentifier (region ).getRegion ());
190188 vault = directory .mkdir (storage ._getFeature (Write .class ), home , status );
@@ -232,6 +230,7 @@ public HubUVFVault load(final Session<?> session, final PasswordCallback prompt)
232230 log .warn ("Skip loading vault with failure {} connecting to storage" , e .toString ());
233231 throw new VaultUnlockCancelException (this , e );
234232 }
233+ final Path home = this .getHome ();
235234 home .setAttributes (storage .getFeature (AttributesFinder .class ).find (home )
236235 .setDisplayname (vaultMetadata .storage ().getNickname ()));
237236 log .debug ("Initialize vault {} with metadata {}" , this , vaultMetadata );
@@ -249,7 +248,7 @@ public String toString() {
249248 final StringBuilder sb = new StringBuilder ("HubUVFVault{" );
250249 sb .append ("vaultId=" ).append (vaultId );
251250 sb .append (", vaultMetadata=" ).append (vaultMetadata );
252- sb .append (", home =" ).append (home );
251+ sb .append (", storage =" ).append (storage );
253252 sb .append ('}' );
254253 return sb .toString ();
255254 }
0 commit comments