Skip to content

Commit 2cd07fa

Browse files
committed
standardize parameter naming for conflict resolution events
1 parent 19117bc commit 2cd07fa

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

src/main/java/org/cryptomator/cryptofs/event/ConflictResolutionFailedEvent.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
/**
66
* Emitted, if the conflict resolution inside an encrypted directory failed
77
*
8-
* @param cleartextPath path within the cryptographic filesystem
9-
* @param ciphertextPath path to the encrypted resource with the broken filename
8+
* @param canonicalCleartextPath path of the canonical file within the cryptographic filesystem
9+
* @param conflictingCiphertextPath path of the encrypted, conflicting file
1010
* @param reason exception, why the resolution failed
1111
*/
12-
public record ConflictResolutionFailedEvent(Path cleartextPath, Path ciphertextPath, Exception reason) implements FilesystemEvent {
12+
public record ConflictResolutionFailedEvent(Path canonicalCleartextPath, Path conflictingCiphertextPath, Exception reason) implements FilesystemEvent {
1313

1414
}

src/main/java/org/cryptomator/cryptofs/event/ConflictResolvedEvent.java

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,18 @@
33
import java.nio.file.Path;
44

55
/**
6-
* Emitted, if a conflict inside an encrypted directory was resolved
6+
* Emitted, if a conflict inside an encrypted directory was resolved.
7+
* <p>
8+
* A conflict exists, if two encrypted files with the same base64url string exist, but the second file has an arbitrary suffix before the file extension.
9+
* The file <i>without</i> the suffix is called <b>canonical</b>.
10+
* The file <i>with the suffix</i> is called <b>conflicting</b>
11+
* On successful conflict resolution the conflicting file is renamed to the <b>resolved</b> file
712
*
8-
* @param cleartextPath path within the cryptographic filesystem
9-
* @param ciphertextPath path to the encrypted resource
10-
* @param oldVersionCleartextPath path within the cryptographic filesystem of the renamed resource
11-
* @param oldVersionCiphertextPath path to the renamed, encrypted resource
13+
* @param canonicalCleartextPath path of the canonical file within the cryptographic filesystem
14+
* @param conflictingCiphertextPath path of the encrypted, conflicting file
15+
* @param resolvedCleartextPath path of the resolved file within the cryptographic filesystem
16+
* @param resolvedCiphertextPath path of the resolved, encrypted file
1217
*/
13-
public record ConflictResolvedEvent(Path cleartextPath, Path ciphertextPath, Path oldVersionCleartextPath, Path oldVersionCiphertextPath) implements FilesystemEvent {
18+
public record ConflictResolvedEvent(Path canonicalCleartextPath, Path conflictingCiphertextPath, Path resolvedCleartextPath, Path resolvedCiphertextPath) implements FilesystemEvent {
1419

1520
}

0 commit comments

Comments
 (0)