Skip to content

Commit

Permalink
Merge branch 'release/1.9.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
overheadhunter committed Dec 29, 2019
2 parents e283616 + 2c8b993 commit d2144c3
Show file tree
Hide file tree
Showing 96 changed files with 2,991 additions and 1,719 deletions.
4 changes: 2 additions & 2 deletions 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>1.8.10</version>
<version>1.9.0</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 All @@ -14,7 +14,7 @@
</scm>

<properties>
<cryptolib.version>1.2.1</cryptolib.version>
<cryptolib.version>1.3.0-beta2</cryptolib.version>
<dagger.version>2.24</dagger.version>
<guava.version>28.1-jre</guava.version>
<slf4j.version>1.7.28</slf4j.version>
Expand Down
66 changes: 66 additions & 0 deletions src/main/java/org/cryptomator/cryptofs/CiphertextFilePath.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
package org.cryptomator.cryptofs;

import org.cryptomator.cryptofs.common.Constants;

import java.nio.file.Path;
import java.util.Objects;
import java.util.Optional;

public class CiphertextFilePath {

private final Path path;
private final Optional<LongFileNameProvider.DeflatedFileName> deflatedFileName;

CiphertextFilePath(Path path, Optional<LongFileNameProvider.DeflatedFileName> deflatedFileName) {
this.path = Objects.requireNonNull(path);
this.deflatedFileName = Objects.requireNonNull(deflatedFileName);
}

public Path getRawPath() {
return path;
}

public boolean isShortened() {
return deflatedFileName.isPresent();
}

public Path getFilePath() {
return isShortened() ? path.resolve(Constants.CONTENTS_FILE_NAME) : path;
}

public Path getDirFilePath() {
return path.resolve(Constants.DIR_FILE_NAME);
}

public Path getSymlinkFilePath() {
return path.resolve(Constants.SYMLINK_FILE_NAME);
}

public Path getInflatedNamePath() {
return path.resolve(Constants.INFLATED_FILE_NAME);
}

@Override
public int hashCode() {
return Objects.hash(path, deflatedFileName);
}

@Override
public boolean equals(Object obj) {
if (obj instanceof CiphertextFilePath) {
CiphertextFilePath other = (CiphertextFilePath) obj;
return this.path.equals(other.path) && this.deflatedFileName.equals(other.deflatedFileName);
} else {
return false;
}
}

@Override
public String toString() {
return path.toString();
}

public void persistLongFileName() {
deflatedFileName.ifPresent(LongFileNameProvider.DeflatedFileName::persist);
}
}
35 changes: 0 additions & 35 deletions src/main/java/org/cryptomator/cryptofs/CiphertextFileType.java

This file was deleted.

175 changes: 0 additions & 175 deletions src/main/java/org/cryptomator/cryptofs/ConflictResolver.java

This file was deleted.

25 changes: 0 additions & 25 deletions src/main/java/org/cryptomator/cryptofs/Constants.java

This file was deleted.

2 changes: 2 additions & 0 deletions src/main/java/org/cryptomator/cryptofs/CopyOperation.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.cryptomator.cryptofs;

import org.cryptomator.cryptofs.common.ArrayUtils;

import javax.inject.Inject;
import javax.inject.Singleton;
import java.io.IOException;
Expand Down
Loading

0 comments on commit d2144c3

Please sign in to comment.