mirror of https://github.com/micromata/borgbackup-butler.git

...
Kai Reinhard
17.35.2018 f96713c51be0c9d1cdaa59e6d4304982d7cf44ea
borgbutler-core/src/main/java/de/micromata/borgbutler/BorgCommands.java
@@ -138,8 +138,8 @@
        ;
    }
    public static List<BorgFilesystemItem> listArchiveContent(BorgRepoConfig repoConfig, String archiveId) {
        Context context = new Context().setRepoConfig(repoConfig).setCommand("list").setArchive(archiveId)
    public static List<BorgFilesystemItem> listArchiveContent(BorgRepoConfig repoConfig, String archive) {
        Context context = new Context().setRepoConfig(repoConfig).setCommand("list").setArchive(archive)
                .setParams("--json-lines");
        ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
        execute(outputStream, context);
@@ -157,10 +157,10 @@
        return content;
    }
    public static Path extractFiles(BorgRepoConfig repoConfig, String archiveId, String path) throws IOException {
    public static Path extractFiles(BorgRepoConfig repoConfig, String archive, String path) throws IOException {
        Path tempDirWithPrefix = Files.createTempDirectory("borbutler");
        Context context = new Context().setWorkingDir(tempDirWithPrefix.toFile()).setRepoConfig(repoConfig)
                .setCommand("extract").setArchive(archiveId).setArgs(path);
                .setCommand("extract").setArchive(archive).setArgs(path);
        execute(context);
        return tempDirWithPrefix;
    }