Comment 7 for bug 1263337

Revision history for this message
Vej (vej) wrote :

Hello.

Here is an excerpt of the code, which shows, that the metadata should be always included during backup (no mater what choices you make for include and exclude):

    var settings = get_settings();
    var include_list = settings.get_file_list(INCLUDE_LIST_KEY); <- This comes from your settings
    var exclude_list = settings.get_file_list(EXCLUDE_LIST_KEY); <- This comes from your settings

    // Exclude directories no one wants to backup
    var always_excluded = get_always_excluded_dirs(); <- This are extra excludes
    foreach (string dir in always_excluded)
      job.excludes.prepend(File.new_for_path(dir));

    foreach (File s in exclude_list)
      job.excludes.prepend(s);
    foreach (File s in include_list)
      job.includes.prepend(s);

    // Insert deja-dup meta info directory <- Here comes the metadata
    string cachedir = Environment.get_user_cache_dir();
    try {
      metadir = File.new_for_path(Path.build_filename(cachedir, Config.PACKAGE, "metadata"));
      fill_metadir();
      job.includes.prepend(metadir);
    }
    catch (Error e) {
      warning("%s\n", e.message);
    }