Merge pull request #17924 from iterate-ch/bugfix/GH-17923

Save attributes in metadata file for folders.
This commit is contained in:
David Kocher
2026-03-10 14:11:27 +01:00
committed by GitHub
18 changed files with 59 additions and 41 deletions
@@ -52,12 +52,13 @@ public class DefaultTouchFeatureTest extends AbstractSFTPTest {
public void testTouchEncrypted() throws Exception {
final Path home = new SFTPHomeDirectoryService(session).find();
final Path vault = new Path(home, UUID.randomUUID().toString(), EnumSet.of(Path.Type.directory));
final Path test = new Path(vault, UUID.randomUUID().toString(), EnumSet.of(Path.Type.file));
final CryptoVault cryptomator = new CryptoVault(vault);
cryptomator.create(session, new VaultCredentials("test"), vaultVersion);
session.withRegistry(new DefaultVaultRegistry(new DisabledPasswordCallback(), cryptomator));
new CryptoTouchFeature<>(session, new DefaultTouchFeature<Void>(
session), cryptomator).touch(new CryptoWriteFeature<>(session, new SFTPWriteFeature(session), cryptomator), test, new TransferStatus());
final Path test = new CryptoTouchFeature<>(session, new DefaultTouchFeature<Void>(
session), cryptomator).touch(new CryptoWriteFeature<>(session, new SFTPWriteFeature(session), cryptomator),
new Path(vault, UUID.randomUUID().toString(), EnumSet.of(Path.Type.file)), new TransferStatus());
assertTrue(test.getType().contains(Path.Type.decrypted));
assertTrue(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(test));
cryptomator.getFeature(session, Delete.class, new SFTPDeleteFeature(session)).delete(Arrays.asList(test, vault), LoginCallback.noop, new Delete.DisabledCallback());
}