Skip to content

Commit 6665a0d

Browse files
Merge branch 'release/1.9.5'
2 parents 35d483b + 4c4dbad commit 6665a0d

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<modelVersion>4.0.0</modelVersion>
33
<groupId>org.cryptomator</groupId>
44
<artifactId>cryptofs</artifactId>
5-
<version>1.9.4</version>
5+
<version>1.9.5</version>
66
<name>Cryptomator Crypto Filesystem</name>
77
<description>This library provides the Java filesystem provider used by Cryptomator.</description>
88
<url>https://github.com/cryptomator/cryptofs</url>

src/main/java/org/cryptomator/cryptofs/attr/CryptoBasicFileAttributes.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ public CryptoBasicFileAttributes(BasicFileAttributes delegate, CiphertextFileTyp
3939
this.ciphertextFileType = ciphertextFileType;
4040
switch (ciphertextFileType) {
4141
case SYMLINK:
42-
this.size = -1;
43-
break;
4442
case DIRECTORY:
4543
this.size = delegate.size();
4644
break;

src/test/java/org/cryptomator/cryptofs/attr/CryptoBasicFileAttributesTest.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,13 @@ public void testSizeOfDirectory() {
8686
Assertions.assertEquals(4096l, attr.size());
8787
}
8888

89+
@Test
90+
public void testSizeOfSymlink() {
91+
Mockito.when(delegateAttr.size()).thenReturn(123l);
92+
BasicFileAttributes attr = new CryptoBasicFileAttributes(delegateAttr, SYMLINK, ciphertextFilePath, cryptor, Optional.empty());
93+
Assertions.assertEquals(123l, attr.size());
94+
}
95+
8996
@Test
9097
public void testSizeSetToZeroIfCryptoHeaderToSmall() {
9198
Mockito.when(delegateAttr.size()).thenReturn(88l + 20l);

0 commit comments

Comments
 (0)