Fixed snapshot database under symlinks on windows

This commit is contained in:
Matthew Miller 2020-08-11 18:09:14 +10:00 committed by Octavia Togami
parent ffaf8e00be
commit 55de7cb71e

View File

@ -93,7 +93,11 @@ public static FileSystemSnapshotDatabase maybeCreate(
public FileSystemSnapshotDatabase(Path root, ArchiveNioSupport archiveNioSupport) {
checkArgument(Files.isDirectory(root), "Database root is not a directory");
this.root = root.toAbsolutePath();
try {
this.root = root.toRealPath();
} catch (IOException e) {
throw new RuntimeException("Failed to resolve snapshot database path", e);
}
this.archiveNioSupport = archiveNioSupport;
}