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

Kai Reinhard
18.44.2018 642e9a865b1d1ed177641d908256b609a7ca64c1
borgbutler-core/src/main/java/de/micromata/borgbutler/cache/ArchiveFilelistCache.java
@@ -30,9 +30,6 @@
    private int cacheArchiveContentMaxDiscSizeMB;
    private long FILES_EXPIRE_TIME = 7 * 24 * 3660 * 1000; // Expires after 7 days.
    @Getter
    private Archive archive;
    public void save(BorgRepoConfig repoConfig, Archive archive, List<BorgFilesystemItem> filesystemItems) {
        File file = getFile(repoConfig, archive);
        if (CollectionUtils.isEmpty(filesystemItems)) {
@@ -52,6 +49,16 @@
    }
    /**
     * @param repoConfig
     * @param archive
     * @return true, if the content of the archive is already cached, otherwise false.
     */
    public boolean contains(BorgRepoConfig repoConfig, Archive archive) {
        File file = getFile(repoConfig, archive);
        return file.exists();
    }
    /**
     * Calls {@link #load(BorgRepoConfig, Archive, FileSystemFilter)} with filter null.
     *
     * @param repoConfig
@@ -86,7 +93,7 @@
     * @return
     */
    public List<BorgFilesystemItem> load(File file, FileSystemFilter filter) {
        if (file.exists() == false) {
        if (!file.exists()) {
            log.error("File '" + file.getAbsolutePath() + "' doesn't exist. Can't get archive content files.");
            return null;
        }