Skip to content

Commit

Permalink
Merge branch 'release/2.6.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
infeo committed Jan 5, 2023
2 parents 1fe8036 + 5d3f986 commit ec170e7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.cryptomator</groupId>
<artifactId>cryptofs</artifactId>
<version>2.6.0</version>
<version>2.6.1</version>
<name>Cryptomator Crypto Filesystem</name>
<description>This library provides the Java filesystem provider used by Cryptomator.</description>
<url>https://github.com/cryptomator/cryptofs</url>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,11 @@ public Path getPathToVault() {
public Path getCiphertextPath(Path cleartextPath) throws IOException {
var p = CryptoPath.castAndAssertAbsolute(cleartextPath);
var nodeType = cryptoPathMapper.getCiphertextFileType(p);
var cipherFile = cryptoPathMapper.getCiphertextFilePath(p);
if( nodeType == CiphertextFileType.DIRECTORY) {
return cryptoPathMapper.getCiphertextDir(p).path;
} else if( nodeType == CiphertextFileType.SYMLINK) {
}
var cipherFile = cryptoPathMapper.getCiphertextFilePath(p);
if( nodeType == CiphertextFileType.SYMLINK) {
return cipherFile.getSymlinkFilePath();
} else {
return cipherFile.getFilePath();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoInteractions;
import static org.mockito.Mockito.verifyNoMoreInteractions;
Expand Down Expand Up @@ -204,6 +205,7 @@ public void testCleartextDirectory() throws IOException {

Path result = inTest.getCiphertextPath(cleartext);
Assertions.assertEquals(ciphertext, result);
Mockito.verify(cryptoPathMapper,never()).getCiphertextFilePath(any());
}
}

Expand Down

0 comments on commit ec170e7

Please sign in to comment.