Skip to content

Commit

Permalink
Creating m directory implicitly during vault initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
markuskreusch committed Nov 10, 2017
1 parent 6be4a51 commit 13fbd2f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ public static void initialize(Path pathToVault, String masterkeyFilename, byte[]
String rootDirHash = cryptor.fileNameCryptor().hashDirectoryId(Constants.ROOT_DIR_ID);
Path rootDirPath = pathToVault.resolve(Constants.DATA_DIR_NAME).resolve(rootDirHash.substring(0, 2)).resolve(rootDirHash.substring(2));
Files.createDirectories(rootDirPath);
// create "m":
Files.createDirectory(pathToVault.resolve(Constants.METADATA_DIR_NAME));
}
assert containsVault(pathToVault, masterkeyFilename);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ public static void setupClass() throws IOException {
pathToVault = tempDir.resolve("vault");
mDir = pathToVault.resolve("m");
Files.createDirectory(pathToVault);
Files.createDirectories(mDir);
fileSystem = new CryptoFileSystemProvider().newFileSystem(create(pathToVault), cryptoFileSystemProperties().withPassphrase("asd").build());
}

Expand Down

0 comments on commit 13fbd2f

Please sign in to comment.