File tree Expand file tree Collapse file tree
main/java/org/cryptomator/cryptofs
test/java/org/cryptomator/cryptofs Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff 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 ();
Original file line number Diff line number Diff line change 7474import static org .mockito .Mockito .doAnswer ;
7575import static org .mockito .Mockito .doThrow ;
7676import static org .mockito .Mockito .mock ;
77+ import static org .mockito .Mockito .never ;
7778import static org .mockito .Mockito .verify ;
7879import static org .mockito .Mockito .verifyNoInteractions ;
7980import 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
You can’t perform that action at this time.
0 commit comments