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

Fin Reinhard
22.51.2019 1c087fae322a1b07bb7bd554ee10ff473c47c727
borgbutler-core/src/main/java/de/micromata/borgbutler/BorgQueueExecutor.java
@@ -78,16 +78,17 @@
     * For displaying purposes.
     *
     * @param repoConfig
     * @param oldJobs If false, the running and queued jobs are returned, otherwise the done ones.
     * @return A list of all jobs of the queue (as copies).
     */
    public List<BorgJob<?>> getJobListCopy(BorgRepoConfig repoConfig) {
    public List<BorgJob<?>> getJobListCopy(BorgRepoConfig repoConfig, boolean oldJobs) {
        JobQueue<String> origQueue = getQueue(repoConfig);
        List<BorgJob<?>> jobList = new ArrayList<>();
        if (origQueue == null) {
            return jobList;
        }
        synchronized (origQueue) {
            Iterator<AbstractJob<String>> it = origQueue.getQueueIterator();
            Iterator<AbstractJob<String>> it = oldJobs ? origQueue.getOldJobsIterator() : origQueue.getQueueIterator();
            while (it.hasNext()) {
                AbstractJob<String> origJob = it.next();
                if (!(origJob instanceof BorgJob)) {