Skip to content

Commit ec170e7

Browse files
committed
Merge branch 'release/2.6.1'
2 parents 1fe8036 + 5d3f986 commit ec170e7

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

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>2.6.0</version>
5+
<version>2.6.1</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/CryptoFileSystemImpl.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,11 @@ public Path getPathToVault() {
140140
public Path getCiphertextPath(Path cleartextPath) throws IOException {
141141
var p = CryptoPath.castAndAssertAbsolute(cleartextPath);
142142
var nodeType = cryptoPathMapper.getCiphertextFileType(p);
143-
var cipherFile = cryptoPathMapper.getCiphertextFilePath(p);
144143
if( nodeType == CiphertextFileType.DIRECTORY) {
145144
return cryptoPathMapper.getCiphertextDir(p).path;
146-
} else if( nodeType == CiphertextFileType.SYMLINK) {
145+
}
146+
var cipherFile = cryptoPathMapper.getCiphertextFilePath(p);
147+
if( nodeType == CiphertextFileType.SYMLINK) {
147148
return cipherFile.getSymlinkFilePath();
148149
} else {
149150
return cipherFile.getFilePath();

src/test/java/org/cryptomator/cryptofs/CryptoFileSystemImplTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
import static org.mockito.Mockito.doAnswer;
7575
import static org.mockito.Mockito.doThrow;
7676
import static org.mockito.Mockito.mock;
77+
import static org.mockito.Mockito.never;
7778
import static org.mockito.Mockito.verify;
7879
import static org.mockito.Mockito.verifyNoInteractions;
7980
import static org.mockito.Mockito.verifyNoMoreInteractions;
@@ -204,6 +205,7 @@ public void testCleartextDirectory() throws IOException {
204205

205206
Path result = inTest.getCiphertextPath(cleartext);
206207
Assertions.assertEquals(ciphertext, result);
208+
Mockito.verify(cryptoPathMapper,never()).getCiphertextFilePath(any());
207209
}
208210
}
209211

0 commit comments

Comments
 (0)