Skip to content

Commit

Permalink
use JVM path separator in keychain pahts propertey
Browse files Browse the repository at this point in the history
  • Loading branch information
infeo committed Jul 31, 2023
1 parent a775325 commit 28a7e4a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Windows-specific implementations of [integrations-api](https://github.com/crypto

This project uses the following JVM properties:
* `cryptomator.integrationsWin.autoStartShellLinkName` - Name of the shell link, which is placed in the Windows startup folder to start application on user login
* `cryptomator.integrationsWin.keychainPaths` - Colon separated list of paths, which are checked for encrypted data
* `cryptomator.integrationsWin.keychainPaths` - List of file paths, which are checked for data encrypted with the Windows data protection api

## Building

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

/**
* Windows implementation for the {@link KeychainAccessProvider} based on the <a href="https://en.wikipedia.org/wiki/Data_Protection_API">data protection API</a>.
* The storage locations to check for encrypted data can be set with the JVM property {@value KEYCHAIN_PATHS_PROPERTY} as a colon({@value PATH_LIST_SEP}) separated list of paths.
* The storage locations to check for encrypted data can be set with the JVM property {@value KEYCHAIN_PATHS_PROPERTY} with the paths seperated with the character defined in the JVM property path.separator.
*/
@Priority(1000)
@OperatingSystem(OperatingSystem.Value.WINDOWS)
Expand Down Expand Up @@ -73,7 +73,7 @@ public WindowsProtectedKeychainAccess() {

private static List<Path> readKeychainPathsFromEnv() {
return Optional.ofNullable(System.getProperty(KEYCHAIN_PATHS_PROPERTY))
.stream().flatMap(rawPaths -> Arrays.stream(rawPaths.split(PATH_LIST_SEP)))
.stream().flatMap(rawPaths -> Arrays.stream(rawPaths.split(System.getProperty("path.separator"))))
.filter(Predicate.not(String::isEmpty))
.map(Path::of)
.map(WindowsProtectedKeychainAccess::resolveHomeDir)
Expand Down

0 comments on commit 28a7e4a

Please sign in to comment.