Skip to content

Commit dc6f076

Browse files
committed
use only Files.isReadable() to avoid problems in rare cases
1 parent 5c1f486 commit dc6f076

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/cryptomator/cli/pwd/PasswordFromFileStrategy.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public String password() {
3535

3636
@Override
3737
public void validate() throws IllegalArgumentException {
38-
if (!Files.isReadable(pathToFile) || !Files.isRegularFile(pathToFile)) {
38+
if (!Files.isReadable(pathToFile)) {
3939
throw new IllegalArgumentException("Cannot read password from file: " + pathToFile);
4040
}
4141
}

0 commit comments

Comments
 (0)