deja-dup-team team mailing list archive
-
deja-dup-team team
-
Mailing list archive
-
Message #00485
[Merge] lp:~mterry/deja-dup/nag into lp:deja-dup
Michael Terry has proposed merging lp:~mterry/deja-dup/nag into lp:deja-dup with lp:~mterry/deja-dup/verify as a prerequisite.
Requested reviews:
Ken VanDine (ken-vandine)
For more details, see:
https://code.launchpad.net/~mterry/deja-dup/nag/+merge/120312
Adds a nag page to occasionally test the verify check without any cache/saved-passwords.
To test:
test/interactive
deja-dup-preferences (set up as needed)
gsettings set org.gnome.DejaDup nag-check '1970-01-01T00:32:08.916885Z'
deja-dup --backup
--
https://code.launchpad.net/~mterry/deja-dup/nag/+merge/120312
Your team Déjà Dup Developers is subscribed to branch lp:deja-dup.
=== modified file 'common/CommonUtils.vala'
--- common/CommonUtils.vala 2012-06-21 15:45:56 +0000
+++ common/CommonUtils.vala 2012-08-20 01:19:22 +0000
@@ -30,6 +30,7 @@
public const string LAST_BACKUP_KEY = "last-backup";
public const string LAST_RESTORE_KEY = "last-restore";
public const string PROMPT_CHECK_KEY = "prompt-check";
+public const string NAG_CHECK_KEY = "nag-check";
public const string PERIODIC_KEY = "periodic";
public const string PERIODIC_PERIOD_KEY = "periodic-period";
public const string DELETE_AFTER_KEY = "delete-after";
@@ -209,11 +210,11 @@
run_deja_dup("--prompt");
}
-public void update_prompt_time(bool cancel = false)
+private void update_time_key(string key, bool cancel)
{
var settings = DejaDup.get_settings();
- if (settings.get_string(PROMPT_CHECK_KEY) == "disabled")
+ if (settings.get_string(key) == "disabled")
return; // never re-enable
string cur_time_str;
@@ -226,7 +227,53 @@
cur_time_str = cur_time.to_iso8601();
}
- settings.set_string(PROMPT_CHECK_KEY, cur_time_str);
+ settings.set_string(key, cur_time_str);
+}
+
+public void update_prompt_time(bool cancel = false)
+{
+ update_time_key(PROMPT_CHECK_KEY, cancel);
+}
+
+public void update_nag_time(bool cancel = false)
+{
+ update_time_key(NAG_CHECK_KEY, cancel);
+}
+
+// In seconds
+public int get_nag_delay()
+{
+ TimeSpan span = 0;
+ if (DejaDup.in_testing_mode())
+ span = TimeSpan.MINUTE * 2;
+ else
+ span = TimeSpan.DAY * 30 * 2;
+ return (int)(span / TimeSpan.SECOND);
+}
+
+// This makes the check of whether we should remind user about their password.
+public bool is_nag_time()
+{
+ var settings = DejaDup.get_settings();
+ var nag = settings.get_string(NAG_CHECK_KEY);
+ var last_run_string = last_run_date(TimestampType.BACKUP);
+
+ if (nag == "disabled" || last_run_string == "")
+ return false;
+ else if (nag == "") {
+ update_nag_time();
+ return false;
+ }
+
+ TimeVal last_check_tval = TimeVal();
+ if (!last_check_tval.from_iso8601(nag))
+ return false;
+
+ var last_check = new DateTime.from_timeval_local(last_check_tval);
+ last_check = last_check.add_seconds(get_nag_delay());
+
+ var now = new DateTime.now_local();
+ return (last_check.compare(now) <= 0);
}
public string get_folder_key(SimpleSettings settings, string key)
=== modified file 'common/Operation.vala'
--- common/Operation.vala 2012-08-20 01:19:22 +0000
+++ common/Operation.vala 2012-08-20 01:19:22 +0000
@@ -41,6 +41,7 @@
public signal void question(string title, string msg);
public signal void is_full(bool first);
+ public bool use_cached_password {get; protected set; default = true;}
public bool needs_password {get; set;}
public Backend backend {get; private set;}
public bool use_progress {get {return (job.flags & ToolJob.Flags.NO_PROGRESS) == 0;}
@@ -91,6 +92,7 @@
protected string passphrase;
bool finished = false;
string saved_detail = null;
+ Operation chained_op = null;
construct
{
backend = Backend.get_default();
@@ -168,12 +170,18 @@
public void cancel()
{
- job.cancel();
+ if (chained_op != null)
+ chained_op.cancel();
+ else
+ job.cancel();
}
public void stop()
{
- job.stop();
+ if (chained_op != null)
+ chained_op.stop();
+ else
+ job.stop();
}
protected virtual void connect_to_job()
@@ -246,23 +254,26 @@
* Sometimes an operation wants to chain to a separate operation.
* Here is the glue to make that happen.
*/
- subop.ref();
+ assert(chained_op == null);
+
+ chained_op = subop;
subop.done.connect((s, c, d) => {
done(s, c, combine_details(saved_detail, d));
- subop.unref();
+ chained_op = null;
});
subop.raise_error.connect((e, d) => {raise_error(e, d);});
subop.progress.connect((p) => {progress(p);});
subop.passphrase_required.connect(() => {
+ needs_password = true;
passphrase_required();
- subop.needs_password = needs_password;
- subop.passphrase = passphrase;
+ if (!needs_password)
+ subop.set_passphrase(passphrase);
});
subop.question.connect((t, m) => {question(t, m);});
+ use_cached_password = subop.use_cached_password;
saved_detail = combine_details(saved_detail, detail);
subop.set_state(get_state());
- job = subop.job;
action_desc_changed(desc);
progress(0);
=== modified file 'common/OperationVerify.vala'
--- common/OperationVerify.vala 2012-08-20 01:19:22 +0000
+++ common/OperationVerify.vala 2012-08-20 01:19:22 +0000
@@ -28,19 +28,40 @@
{
File metadir;
File destdir;
+ bool nag;
public OperationVerify() {
Object(mode: ToolJob.Mode.RESTORE);
}
+ construct {
+ // Should we nag user about password, etc? What this really means is that
+ // we try to do our normal verification routine in as close an emulation
+ // to a fresh restore after a disaster as possible. So fresh cache, no
+ // saved password, etc. We do *not* explicitly unmount the backend,
+ // because we may not be the only consumers.
+ if (is_nag_time()) {
+ use_cached_password = false;
+ nag = true;
+ }
+ }
+
public async override void start(bool try_claim_bus = true)
{
+ if (nag) {
+ var fake_state = new State();
+ fake_state.backend = backend.clone();
+ set_state(fake_state);
+ }
action_desc_changed(_("Verifying backup…"));
yield base.start(try_claim_bus);
}
protected override void connect_to_job()
{
+ if (nag)
+ job.flags |= ToolJob.Flags.NO_CACHE;
+
string cachedir = Environment.get_user_cache_dir();
metadir = File.new_for_path(Path.build_filename(cachedir, Config.PACKAGE, "metadata"));
job.restore_files.append(metadir);
@@ -73,6 +94,9 @@
raise_error(_("Your backup appears to be corrupted. You should delete the backup and try again."), null);
success = false;
}
+
+ if (nag)
+ update_nag_time();
}
new RecursiveDelete(metadir).start();
=== modified file 'common/ToolPlugin.vala'
--- common/ToolPlugin.vala 2012-04-30 00:23:37 +0000
+++ common/ToolPlugin.vala 2012-08-20 01:19:22 +0000
@@ -55,6 +55,7 @@
public enum Flags {
NO_PROGRESS,
+ NO_CACHE,
}
public Flags flags {get; set;}
=== modified file 'configure.ac'
--- configure.ac 2012-07-20 23:42:14 +0000
+++ configure.ac 2012-08-20 01:19:22 +0000
@@ -40,7 +40,7 @@
PKG_PROG_PKG_CONFIG([0.24])
-DD_PROG_VALAC([0.16.0], [valac-0.18 valac-0.16 valac])
+DD_PROG_VALAC([0.16.0], [valac-0.16 valac])
AS_IF([test "x$(basename $VALAC)" = xvalac-0.16],
[AC_SUBST(SHARED_VALAFLAGS, ["-D HAVE_VALAC_16"])]
)
=== modified file 'data/org.gnome.DejaDup.gschema.xml.in'
--- data/org.gnome.DejaDup.gschema.xml.in 2012-06-21 15:45:56 +0000
+++ data/org.gnome.DejaDup.gschema.xml.in 2012-08-20 01:19:22 +0000
@@ -47,9 +47,14 @@
</key>
<key name="prompt-check" type="s">
<default>''</default>
- <_summary>The first time Déjà Dup checked whether it should prompt about backing up</_summary>
+ <_summary>The last time Déjà Dup checked whether it should prompt about backing up</_summary>
<_description>When a user logs in, the Déjà Dup monitor checks whether it should prompt about backing up. This is used to increase discoverability for users that don’t know about backups. This time should be either ‘disabled’ to turn off this check or in ISO 8601 format.</_description>
</key>
+ <key name="nag-check" type="s">
+ <default>''</default>
+ <_summary>The last time Déjà Dup checked whether it should prompt about your password</_summary>
+ <_description>In order to prevent you from forgetting your passwords, Déjà Dup will occasionally notify you to confirm the password. This time should be either ‘disabled’ to turn off this check or in ISO 8601 format.</_description>
+ </key>
<key name="delete-after" type="i">
<default>0</default>
<_summary>How long to keep backup files</_summary>
=== modified file 'deja-dup/Assistant.vala'
--- deja-dup/Assistant.vala 2012-08-06 22:41:13 +0000
+++ deja-dup/Assistant.vala 2012-08-20 01:19:22 +0000
@@ -39,7 +39,7 @@
public bool last_op_was_back {get; private set; default = false;}
public enum Type {
- NORMAL, INTERRUPT, SUMMARY, PROGRESS, FINISH
+ NORMAL, INTERRUPT, CHECK, SUMMARY, PROGRESS, FINISH
}
Gtk.Label header_title;
@@ -165,6 +165,11 @@
go_forward();
}
+ static bool is_interrupt_type(Type type)
+ {
+ return type == Type.INTERRUPT || type == Type.CHECK;
+ }
+
public void go_back()
{
weak List<PageInfo> next;
@@ -172,7 +177,7 @@
next = interrupted.prev;
else {
next = current.prev;
- while (next != null && next.data.type == Type.INTERRUPT)
+ while (next != null && is_interrupt_type(next.data.type))
next = next.prev;
}
@@ -194,7 +199,7 @@
}
else {
next = (current == null) ? infos : current.next;
- while (next != null && next.data.type == Type.INTERRUPT)
+ while (next != null && is_interrupt_type(next.data.type))
next = next.next;
}
@@ -309,6 +314,11 @@
forward_text = _("Co_ntinue");
}
break;
+ case Type.CHECK:
+ show_close = true;
+ show_forward = true;
+ forward_text = C_("verb", "_Test");
+ break;
case Type.PROGRESS:
show_cancel = true;
show_resume = true;
=== modified file 'deja-dup/AssistantOperation.vala'
--- deja-dup/AssistantOperation.vala 2012-08-06 22:41:13 +0000
+++ deja-dup/AssistantOperation.vala 2012-08-20 01:19:22 +0000
@@ -45,11 +45,13 @@
protected StatusIcon status_icon;
protected bool succeeded = false;
+ Gtk.Entry nag_entry;
Gtk.Entry encrypt_entry;
Gtk.Entry encrypt_confirm_entry;
Gtk.RadioButton encrypt_enabled;
Gtk.CheckButton encrypt_remember;
protected Gtk.Widget password_page {get; private set;}
+ protected Gtk.Widget nag_page {get; private set;}
List<Gtk.Widget> first_password_widgets;
MainLoop password_ask_loop;
MainLoop password_find_loop;
@@ -94,6 +96,7 @@
add_setup_pages();
add_confirm_page();
add_password_page();
+ add_nag_page();
add_question_page();
add_progress_page();
add_summary_page();
@@ -384,6 +387,59 @@
return page;
}
+ protected Gtk.Widget make_nag_page()
+ {
+ int rows = 0;
+ Gtk.Widget w, label;
+
+ var page = new Gtk.Grid();
+ page.set("row-spacing", 6,
+ "column-spacing", 6,
+ "border-width", 12);
+
+ w = new Gtk.Label(_("In order to check that you will be able to retrieve your files in the case of an emergency, please enter your encryption password again to perform a brief restore test."));
+ w.set("xalign", 0.0f,
+ "max-width-chars", 25,
+ "wrap", true);
+ page.attach(w, 0, rows, 3, 1);
+ w.hide();
+ ++rows;
+
+ w = new Gtk.Entry();
+ w.set("visibility", false,
+ "hexpand", true,
+ "activates-default", true);
+ ((Gtk.Entry)w).changed.connect((entry) => {check_nag_validity();});
+ label = new Gtk.Label(_("E_ncryption password"));
+ label.set("mnemonic-widget", w,
+ "use-underline", true,
+ "xalign", 1.0f);
+ page.attach(label, 1, rows, 1, 1);
+ page.attach(w, 2, rows, 1, 1);
+ nag_entry = w as Gtk.Entry;
+ ++rows;
+
+ w = new Gtk.CheckButton.with_mnemonic(_("_Show password"));
+ ((Gtk.CheckButton)w).toggled.connect((button) => {
+ nag_entry.visibility = button.get_active();
+ });
+ page.attach(w, 2, rows, 1, 1);
+ ++rows;
+
+ w = new Gtk.CheckButton.with_mnemonic(_("Test every two _months"));
+ page.attach(w, 0, rows, 3, 1);
+ w.hide();
+ ((Gtk.CheckButton)w).active = true;
+ w.vexpand = true;
+ w.valign = Gtk.Align.END;
+ ((Gtk.CheckButton)w).toggled.connect((button) => {
+ DejaDup.update_nag_time(!button.get_active());
+ });
+ ++rows;
+
+ return page;
+ }
+
protected Gtk.Widget make_question_page()
{
int rows = 0;
@@ -462,6 +518,14 @@
password_page = page;
}
+ void add_nag_page()
+ {
+ var page = make_nag_page();
+ append_page(page, Type.CHECK);
+ set_page_title(page, _("Restore Test"));
+ nag_page = page;
+ }
+
void add_question_page()
{
var page = make_question_page();
@@ -588,7 +652,7 @@
else if (op == null)
do_apply.begin();
}
- else if (page == password_page)
+ else if (page == password_page || page == nag_page)
set_header_icon(Gtk.Stock.DIALOG_AUTHENTICATION);
}
@@ -677,8 +741,8 @@
protected void get_passphrase()
{
- // DEJA_DUP_TESTING only set when we are in test suite
- if (!searched_for_passphrase && !DejaDup.in_testing_mode()) {
+ if (!searched_for_passphrase && !DejaDup.in_testing_mode() &&
+ op.use_cached_password) {
// First, try user's keyring
GnomeKeyring.find_password(PASSPHRASE_SCHEMA,
found_passphrase,
@@ -730,14 +794,31 @@
set_page_title(password_page, _("Require Password?"));
else
set_page_title(password_page, _("Encryption Password Needed"));
- foreach (Gtk.Widget w in first_password_widgets) {
+
+ foreach (Gtk.Widget w in first_password_widgets)
w.visible = first;
- }
+
check_password_validity();
encrypt_entry.select_region(0, -1);
encrypt_entry.grab_focus();
}
+ void check_nag_validity()
+ {
+ var passphrase = nag_entry.get_text();
+ if (passphrase == "")
+ allow_forward(false);
+ else
+ allow_forward(true);
+ }
+
+ void configure_nag_page()
+ {
+ check_nag_validity();
+ nag_entry.set_text("");
+ nag_entry.grab_focus();
+ }
+
void stop_password_loop(Assistant dlg, int resp)
{
Idle.add(() => {
@@ -751,8 +832,14 @@
protected void ask_passphrase(bool first = false)
{
op.needs_password = true;
- interrupt(password_page);
- configure_password_page(first);
+ if (op.use_cached_password) {
+ interrupt(password_page);
+ configure_password_page(first);
+ }
+ else {
+ interrupt(nag_page);
+ configure_nag_page();
+ }
force_visible(false);
// pause until we can provide password by entering new main loop
password_ask_loop = new MainLoop(null);
@@ -764,22 +851,29 @@
{
var passphrase = "";
- if (encrypt_enabled.active) {
- passphrase = encrypt_entry.get_text().strip();
+ if (op.use_cached_password) {
+ if (encrypt_enabled.active) {
+ passphrase = encrypt_entry.get_text().strip();
+ if (passphrase == "") // all whitespace password? allow it...
+ passphrase = encrypt_entry.get_text();
+ }
+
+ if (passphrase != "") {
+ // Save it
+ if (encrypt_remember.active) {
+ GnomeKeyring.store_password(PASSPHRASE_SCHEMA,
+ GnomeKeyring.DEFAULT,
+ _("Backup encryption password"),
+ passphrase, save_password_callback,
+ "owner", Config.PACKAGE,
+ "type", "passphrase");
+ }
+ }
+ }
+ else {
+ passphrase = nag_entry.get_text().strip();
if (passphrase == "") // all whitespace password? allow it...
- passphrase = encrypt_entry.get_text();
- }
-
- if (passphrase != "") {
- // Save it
- if (encrypt_remember.active) {
- GnomeKeyring.store_password(PASSPHRASE_SCHEMA,
- GnomeKeyring.DEFAULT,
- _("Backup encryption password"),
- passphrase, save_password_callback,
- "owner", Config.PACKAGE,
- "type", "passphrase");
- }
+ passphrase = nag_entry.get_text();
}
op.set_passphrase(passphrase);
=== removed file 'po/deja-dup.pot'
--- po/deja-dup.pot 2012-07-20 23:42:14 +0000
+++ po/deja-dup.pot 1970-01-01 00:00:00 +0000
@@ -1,1360 +0,0 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"Report-Msgid-Bugs-To: mike@xxxxxxxxxxx\n"
-"POT-Creation-Date: 2012-07-20 19:31-0400\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL@xxxxxx>\n"
-"Language: \n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
-
-#. Translators: "Backup" is a noun
-#: ../data/deja-dup.desktop.in.h:1 ../data/deja-dup-ccpanel.desktop.in.h:1
-#: ../data/deja-dup-preferences.desktop.in.in.h:1 ../deja-dup/Prompt.vala:93
-#: ../deja-dup/Prompt.vala:127 ../deja-dup/StatusIcon.vala:133
-#: ../deja-dup/StatusIcon.vala:231 ../monitor/monitor.vala:115
-#: ../preferences/preferences-main.vala:52
-#: ../preferences/preferences-main.vala:66
-msgid "Backup"
-msgstr ""
-
-#. Translators: The name is a play on the French phrase "déjà vu" meaning
-#. "already seen", but with the "vu" replaced with "dup". "Dup" in this
-#. context is itself a reference to both the underlying command line tool
-#. "duplicity" and the act of duplicating data for backup. As a whole, the
-#. phrase "Déjà Dup" may not be very translatable.
-#: ../data/deja-dup.desktop.in.h:2 ../common/CommonUtils.vala:89
-#: ../deja-dup/main.vala:78 ../preferences/Preferences.vala:88
-#, c-format
-msgid "Déjà Dup Backup Tool"
-msgstr ""
-
-#: ../data/deja-dup-ccpanel.desktop.in.h:2
-#: ../data/deja-dup-preferences.desktop.in.in.h:2
-msgid "Change your backup settings"
-msgstr ""
-
-#. These keywords are used when searching for applications in dashes, etc.
-#: ../data/deja-dup-ccpanel.desktop.in.h:4
-#: ../data/deja-dup-preferences.desktop.in.in.h:4
-msgid "déjà;deja;dup;"
-msgstr ""
-
-#: ../data/deja-dup-ccpanel.desktop.in.h:5
-#: ../data/deja-dup-preferences.desktop.in.in.h:5
-msgid "Back Up Now"
-msgstr ""
-
-#. Translators: Monitor in this sense means something akin to 'watcher', not
-#. a computer screen. This program acts like a daemon that kicks off
-#. backups at scheduled times.
-#: ../data/deja-dup-monitor.desktop.in.in.h:1 ../monitor/monitor.vala:304
-msgid "Backup Monitor"
-msgstr ""
-
-#: ../data/deja-dup-monitor.desktop.in.in.h:2
-msgid "Schedules backups at regular intervals"
-msgstr ""
-
-#: ../data/org.gnome.DejaDup.gschema.xml.in.h:1
-#: ../preferences/Preferences.vala:160
-msgid "Folders to back up"
-msgstr ""
-
-#: ../data/org.gnome.DejaDup.gschema.xml.in.h:2
-msgid ""
-"This list of directories will be backed up. Reserved values $HOME, $DESKTOP, "
-"$DOCUMENTS, $DOWNLOAD, $MUSIC, $PICTURES, $PUBLIC_SHARE, $TEMPLATES, $TRASH, "
-"and $VIDEO are recognized as the user’s special directories. Relative "
-"entries are relative to the user’s home directory."
-msgstr ""
-
-#: ../data/org.gnome.DejaDup.gschema.xml.in.h:3
-#: ../preferences/Preferences.vala:168
-msgid "Folders to ignore"
-msgstr ""
-
-#: ../data/org.gnome.DejaDup.gschema.xml.in.h:4
-msgid ""
-"This list of directories will not be backed up. Reserved values $HOME, "
-"$DESKTOP, $DOCUMENTS, $DOWNLOAD, $MUSIC, $PICTURES, $PUBLIC_SHARE, "
-"$TEMPLATES, $TRASH, and $VIDEO are recognized as the user’s special "
-"directories. Relative entries are relative to the user’s home directory."
-msgstr ""
-
-#: ../data/org.gnome.DejaDup.gschema.xml.in.h:5
-msgid "Whether the welcome screen has been dismissed"
-msgstr ""
-
-#: ../data/org.gnome.DejaDup.gschema.xml.in.h:6
-msgid "Whether to request the root password"
-msgstr ""
-
-#: ../data/org.gnome.DejaDup.gschema.xml.in.h:7
-msgid ""
-"Whether to request the root password when backing up from or restoring to "
-"system folders."
-msgstr ""
-
-#: ../data/org.gnome.DejaDup.gschema.xml.in.h:8
-msgid "The last time Déjà Dup was run"
-msgstr ""
-
-#: ../data/org.gnome.DejaDup.gschema.xml.in.h:9
-msgid ""
-"The last time Déjà Dup was successfully run. This time should be in ISO 8601 "
-"format."
-msgstr ""
-
-#: ../data/org.gnome.DejaDup.gschema.xml.in.h:10
-msgid "The last time Déjà Dup backed up"
-msgstr ""
-
-#: ../data/org.gnome.DejaDup.gschema.xml.in.h:11
-msgid ""
-"The last time Déjà Dup successfully completed a backup. This time should be "
-"in ISO 8601 format."
-msgstr ""
-
-#: ../data/org.gnome.DejaDup.gschema.xml.in.h:12
-msgid "The last time Déjà Dup restored"
-msgstr ""
-
-#: ../data/org.gnome.DejaDup.gschema.xml.in.h:13
-msgid ""
-"The last time Déjà Dup successfully completed a restore. This time should be "
-"in ISO 8601 format."
-msgstr ""
-
-#: ../data/org.gnome.DejaDup.gschema.xml.in.h:14
-msgid "Whether to periodically back up"
-msgstr ""
-
-#: ../data/org.gnome.DejaDup.gschema.xml.in.h:15
-msgid "Whether to automatically back up on a regular schedule."
-msgstr ""
-
-#: ../data/org.gnome.DejaDup.gschema.xml.in.h:16
-msgid "How often to periodically back up"
-msgstr ""
-
-#: ../data/org.gnome.DejaDup.gschema.xml.in.h:17
-msgid "The number of days between backups."
-msgstr ""
-
-#: ../data/org.gnome.DejaDup.gschema.xml.in.h:18
-msgid ""
-"The first time Déjà Dup checked whether it should prompt about backing up"
-msgstr ""
-
-#: ../data/org.gnome.DejaDup.gschema.xml.in.h:19
-msgid ""
-"When a user logs in, the Déjà Dup monitor checks whether it should prompt "
-"about backing up. This is used to increase discoverability for users that "
-"don’t know about backups. This time should be either ‘disabled’ to turn off "
-"this check or in ISO 8601 format."
-msgstr ""
-
-#: ../data/org.gnome.DejaDup.gschema.xml.in.h:20
-msgid "How long to keep backup files"
-msgstr ""
-
-#: ../data/org.gnome.DejaDup.gschema.xml.in.h:21
-msgid ""
-"The number of days to keep backup files on the backup location. A value of 0 "
-"means forever. This is a minimum number of days; the files may be kept "
-"longer."
-msgstr ""
-
-#: ../data/org.gnome.DejaDup.gschema.xml.in.h:22
-msgid "How long to wait between full backups"
-msgstr ""
-
-#: ../data/org.gnome.DejaDup.gschema.xml.in.h:23
-msgid ""
-"Déjà Dup needs to occasionally make fresh full backups. This is the number "
-"of days to wait between full backups."
-msgstr ""
-
-#: ../data/org.gnome.DejaDup.gschema.xml.in.h:24
-msgid "Type of location to store backup"
-msgstr ""
-
-#: ../data/org.gnome.DejaDup.gschema.xml.in.h:25
-msgid ""
-"The type of backup location. If ‘auto’, a default will be chosen based on "
-"what is available."
-msgstr ""
-
-#: ../data/org.gnome.DejaDup.gschema.xml.in.h:26
-msgid "Amazon S3 Access Key ID"
-msgstr ""
-
-#: ../data/org.gnome.DejaDup.gschema.xml.in.h:27
-msgid "Your Amazon S3 Access Key Identifier. This acts as your S3 username."
-msgstr ""
-
-#: ../data/org.gnome.DejaDup.gschema.xml.in.h:28
-msgid "The Amazon S3 bucket name to use"
-msgstr ""
-
-#: ../data/org.gnome.DejaDup.gschema.xml.in.h:29
-msgid ""
-"Which Amazon S3 bucket to store files in. This does not need to exist "
-"already. Only legal hostname strings are valid."
-msgstr ""
-
-#. Left this way for historical reasons, should be '$HOSTNAME'. See convert_s3_folder_to_hostname()
-#: ../data/org.gnome.DejaDup.gschema.xml.in.h:31
-msgid "The Amazon S3 folder"
-msgstr ""
-
-#: ../data/org.gnome.DejaDup.gschema.xml.in.h:32
-msgid ""
-"An optional folder name to store files in. This folder will be created in "
-"the chosen bucket."
-msgstr ""
-
-#: ../data/org.gnome.DejaDup.gschema.xml.in.h:33
-msgid "The Rackspace Cloud Files container"
-msgstr ""
-
-#: ../data/org.gnome.DejaDup.gschema.xml.in.h:34
-msgid ""
-"Which Rackspace Cloud Files container to store files in. This does not need "
-"to exist already. Only legal hostname strings are valid."
-msgstr ""
-
-#: ../data/org.gnome.DejaDup.gschema.xml.in.h:35
-msgid "Your Rackspace username"
-msgstr ""
-
-#: ../data/org.gnome.DejaDup.gschema.xml.in.h:36
-msgid "This is your username for the Rackspace Cloud Files service."
-msgstr ""
-
-#: ../data/org.gnome.DejaDup.gschema.xml.in.h:37
-msgid "The Ubuntu One folder"
-msgstr ""
-
-#: ../data/org.gnome.DejaDup.gschema.xml.in.h:38
-msgid ""
-"The folder name to store files in. If ‘$HOSTNAME’, it will default to a "
-"folder based on the name of the computer."
-msgstr ""
-
-#: ../data/org.gnome.DejaDup.gschema.xml.in.h:39
-#: ../deja-dup/AssistantRestore.vala:221 ../preferences/Preferences.vala:151
-msgid "Backup location"
-msgstr ""
-
-#: ../data/org.gnome.DejaDup.gschema.xml.in.h:40
-msgid "Location in which to hold the backup files."
-msgstr ""
-
-#: ../data/org.gnome.DejaDup.gschema.xml.in.h:41
-msgid "Folder type"
-msgstr ""
-
-#: ../data/org.gnome.DejaDup.gschema.xml.in.h:42
-msgid ""
-"Whether the backup location is a mounted external volume or a normal folder."
-msgstr ""
-
-#: ../data/org.gnome.DejaDup.gschema.xml.in.h:43
-msgid "Relative path under the external volume"
-msgstr ""
-
-#: ../data/org.gnome.DejaDup.gschema.xml.in.h:44
-msgid ""
-"If the backup location is on an external volume, this is the path of the "
-"folder on that volume."
-msgstr ""
-
-#: ../data/org.gnome.DejaDup.gschema.xml.in.h:45
-msgid "Unique ID of the external volume"
-msgstr ""
-
-#: ../data/org.gnome.DejaDup.gschema.xml.in.h:46
-msgid ""
-"If the backup location is on an external volume, this is its unique "
-"filesystem identifier."
-msgstr ""
-
-#: ../data/org.gnome.DejaDup.gschema.xml.in.h:47
-msgid "Full name of the external volume"
-msgstr ""
-
-#: ../data/org.gnome.DejaDup.gschema.xml.in.h:48
-msgid ""
-"If the backup location is on an external volume, this is the volume’s longer "
-"descriptive name."
-msgstr ""
-
-#: ../data/org.gnome.DejaDup.gschema.xml.in.h:49
-msgid "Short name of the external volume"
-msgstr ""
-
-#: ../data/org.gnome.DejaDup.gschema.xml.in.h:50
-msgid ""
-"If the backup location is on an external volume, this is the volume’s "
-"shorter name."
-msgstr ""
-
-#: ../data/org.gnome.DejaDup.gschema.xml.in.h:51
-msgid "Icon of the external volume"
-msgstr ""
-
-#: ../data/org.gnome.DejaDup.gschema.xml.in.h:52
-msgid ""
-"If the backup location is on an external volume, this is the volume’s icon."
-msgstr ""
-
-#: ../data/org.gnome.DejaDup.gschema.xml.in.h:53
-msgid "Obsolete"
-msgstr ""
-
-#: ../data/ui/restore-missing.ui.h:1
-msgid "Folder"
-msgstr ""
-
-#: ../data/ui/restore-missing.ui.h:2 ../deja-dup/AssistantOperation.vala:175
-msgid "Scanning…"
-msgstr ""
-
-#: ../nautilus/NautilusExtension.c:174
-msgid "Restore Missing Files…"
-msgstr ""
-
-#: ../nautilus/NautilusExtension.c:175
-msgid "Restore deleted files from backup"
-msgstr ""
-
-#: ../nautilus/NautilusExtension.c:217
-msgid "Revert to Previous Version…"
-msgid_plural "Revert to Previous Versions…"
-msgstr[0] ""
-msgstr[1] ""
-
-#: ../nautilus/NautilusExtension.c:221
-msgid "Restore file from backup"
-msgid_plural "Restore files from backup"
-msgstr[0] ""
-msgstr[1] ""
-
-#. Translators: %2$s is the name of a removable drive, %1$s is a folder
-#. on that removable drive.
-#: ../common/BackendFile.vala:135 ../common/CommonUtils.vala:434
-#, c-format
-msgid "%1$s on %2$s"
-msgstr ""
-
-#: ../common/BackendFile.vala:168
-#, c-format
-msgid "Backup will begin when %s becomes connected."
-msgstr ""
-
-#: ../common/BackendFile.vala:175 ../common/BackendRackspace.vala:49
-#: ../common/BackendS3.vala:59 ../common/BackendU1.vala:150
-msgid "Backup will begin when a network connection becomes available."
-msgstr ""
-
-#: ../common/BackendFile.vala:384 ../common/BackendFile.vala:448
-msgid "Backup location not available"
-msgstr ""
-
-#: ../common/BackendFile.vala:385
-msgid "Waiting for a network connection…"
-msgstr ""
-
-#: ../common/BackendFile.vala:448
-#, c-format
-msgid "Waiting for ‘%s’ to become connected…"
-msgstr ""
-
-#: ../common/BackendRackspace.vala:69 ../widgets/ConfigLocation.vala:194
-msgid "Rackspace Cloud Files"
-msgstr ""
-
-#. Translators: %s is a folder.
-#: ../common/BackendRackspace.vala:72
-#, c-format
-msgid "%s on Rackspace Cloud Files"
-msgstr ""
-
-#: ../common/BackendRackspace.vala:119 ../common/BackendS3.vala:172
-msgid "Permission denied"
-msgstr ""
-
-#: ../common/BackendRackspace.vala:140
-#, c-format
-msgid ""
-"You can sign up for a Rackspace Cloud Files account <a href=\"%s\">online</"
-"a>."
-msgstr ""
-
-#: ../common/BackendRackspace.vala:141
-msgid "Connect to Rackspace Cloud Files"
-msgstr ""
-
-#: ../common/BackendRackspace.vala:142
-msgid "_API access key"
-msgstr ""
-
-#: ../common/BackendRackspace.vala:143
-msgid "S_how API access key"
-msgstr ""
-
-#: ../common/BackendRackspace.vala:144
-msgid "_Remember API access key"
-msgstr ""
-
-#: ../common/BackendS3.vala:122 ../widgets/ConfigLocation.vala:176
-msgid "Amazon S3"
-msgstr ""
-
-#. Translators: %s is a folder.
-#: ../common/BackendS3.vala:125
-#, c-format
-msgid "%s on Amazon S3"
-msgstr ""
-
-#: ../common/BackendS3.vala:193
-#, c-format
-msgid "You can sign up for an Amazon S3 account <a href=\"%s\">online</a>."
-msgstr ""
-
-#: ../common/BackendS3.vala:194
-msgid "Connect to Amazon S3"
-msgstr ""
-
-#: ../common/BackendS3.vala:195
-msgid "_Access key ID"
-msgstr ""
-
-#: ../common/BackendS3.vala:196
-msgid "_Secret access key"
-msgstr ""
-
-#: ../common/BackendS3.vala:197
-msgid "S_how secret access key"
-msgstr ""
-
-#: ../common/BackendS3.vala:198
-msgid "_Remember secret access key"
-msgstr ""
-
-#: ../common/BackendU1.vala:166 ../widgets/ConfigLocation.vala:186
-msgid "Ubuntu One"
-msgstr ""
-
-#. Translators: %s is a folder.
-#: ../common/BackendU1.vala:169
-#, c-format
-msgid "%s on Ubuntu One"
-msgstr ""
-
-#: ../common/BackendU1.vala:236
-msgid "Connect to Ubuntu One"
-msgstr ""
-
-#: ../common/BackendU1.vala:237
-msgid "Sign into Ubuntu One…"
-msgstr ""
-
-#: ../common/CommonUtils.vala:354
-#, c-format
-msgid "Could not find backup tool in %s. Your installation is incomplete."
-msgstr ""
-
-#: ../common/CommonUtils.vala:356
-msgid "Could not load backup tool. Your installation is incomplete."
-msgstr ""
-
-#: ../common/CommonUtils.vala:362
-msgid "Backup tool is broken. Your installation is incomplete."
-msgstr ""
-
-#: ../common/CommonUtils.vala:384
-msgid "Could not start backup tool"
-msgstr ""
-
-#. Translators: this is the home folder and %s is the user's username
-#: ../common/CommonUtils.vala:485
-#, c-format
-msgid "Home (%s)"
-msgstr ""
-
-#. Translators: this is the home folder
-#: ../common/CommonUtils.vala:490
-msgid "Home"
-msgstr ""
-
-#. Translators: this is the trash folder
-#: ../common/CommonUtils.vala:495
-msgid "Trash"
-msgstr ""
-
-#: ../common/OperationRestore.vala:51
-msgid "Restoring files…"
-msgstr ""
-
-#: ../common/Operation.vala:60
-msgid "Backing up…"
-msgstr ""
-
-#: ../common/Operation.vala:62 ../deja-dup/AssistantRestore.vala:484
-msgid "Restoring…"
-msgstr ""
-
-#: ../common/Operation.vala:64
-msgid "Checking for backups…"
-msgstr ""
-
-#: ../common/Operation.vala:66
-msgid "Listing files…"
-msgstr ""
-
-#: ../common/Operation.vala:68 ../common/Operation.vala:100
-#: ../tools/duplicity/DuplicityJob.vala:386
-#: ../tools/duplicity/DuplicityJob.vala:393
-#: ../tools/duplicity/DuplicityJob.vala:412
-#: ../tools/duplicity/DuplicityJob.vala:417
-msgid "Preparing…"
-msgstr ""
-
-#: ../common/Operation.vala:237
-msgid "Another backup operation is already running"
-msgstr ""
-
-#: ../deja-dup/AssistantBackup.vala:31
-msgctxt "back up is verb"
-msgid "Back Up"
-msgstr ""
-
-#: ../deja-dup/AssistantBackup.vala:32
-msgctxt "back up is verb"
-msgid "_Back Up"
-msgstr ""
-
-#: ../deja-dup/AssistantBackup.vala:49
-msgid "Creating the first backup. This may take a while."
-msgstr ""
-
-#: ../deja-dup/AssistantBackup.vala:50
-msgid ""
-"Creating a fresh backup to protect against backup corruption. This will "
-"take longer than normal."
-msgstr ""
-
-#. Translators: This is the phrase 'Backing up' in the larger phrase
-#. "Backing up '%s'". %s is a filename.
-#: ../deja-dup/AssistantBackup.vala:80
-msgid "Backing up:"
-msgstr ""
-
-#: ../deja-dup/AssistantBackup.vala:89
-msgid "Backup Failed"
-msgstr ""
-
-#: ../deja-dup/AssistantBackup.vala:92
-msgid "Backup Finished"
-msgstr ""
-
-#: ../deja-dup/AssistantBackup.vala:100
-msgid "Backing Up…"
-msgstr ""
-
-#: ../deja-dup/AssistantOperation.vala:174
-msgid "Scanning:"
-msgstr ""
-
-#: ../deja-dup/AssistantOperation.vala:256
-msgid "_Details"
-msgstr ""
-
-#: ../deja-dup/AssistantOperation.vala:304
-msgid "_Allow restoring without a password"
-msgstr ""
-
-#: ../deja-dup/AssistantOperation.vala:310
-msgid "_Password-protect your backup"
-msgstr ""
-
-#: ../deja-dup/AssistantOperation.vala:324
-#, c-format
-msgid ""
-"You will need your password to restore your files. You might want to write "
-"it down."
-msgstr ""
-
-#: ../deja-dup/AssistantOperation.vala:339
-msgid "E_ncryption password"
-msgstr ""
-
-#: ../deja-dup/AssistantOperation.vala:356
-msgid "Confir_m password"
-msgstr ""
-
-#: ../deja-dup/AssistantOperation.vala:369
-msgid "_Show password"
-msgstr ""
-
-#: ../deja-dup/AssistantOperation.vala:378
-#: ../deja-dup/MountOperationAssistant.vala:40
-msgid "_Remember password"
-msgstr ""
-
-#: ../deja-dup/AssistantOperation.vala:447
-msgid "Summary"
-msgstr ""
-
-#: ../deja-dup/AssistantOperation.vala:537
-#: ../tools/duplicity/DuplicityJob.vala:694
-#: ../tools/duplicity/DuplicityJob.vala:1076
-msgid "Failed with an unknown error."
-msgstr ""
-
-#: ../deja-dup/AssistantOperation.vala:730
-msgid "Require Password?"
-msgstr ""
-
-#: ../deja-dup/AssistantOperation.vala:732
-msgid "Encryption Password Needed"
-msgstr ""
-
-#: ../deja-dup/AssistantOperation.vala:778
-msgid "Backup encryption password"
-msgstr ""
-
-#: ../deja-dup/AssistantRestore.vala:68
-msgid "Restore"
-msgstr ""
-
-#: ../deja-dup/AssistantRestore.vala:69
-msgid "_Restore"
-msgstr ""
-
-#: ../deja-dup/AssistantRestore.vala:91 ../preferences/Preferences.vala:262
-msgid "_Backup location"
-msgstr ""
-
-#: ../deja-dup/AssistantRestore.vala:124
-msgid "Restore From Where?"
-msgstr ""
-
-#: ../deja-dup/AssistantRestore.vala:146
-msgid "_Date"
-msgstr ""
-
-#: ../deja-dup/AssistantRestore.vala:169
-msgid "Restore files to _original locations"
-msgstr ""
-
-#: ../deja-dup/AssistantRestore.vala:174
-msgid "Restore to _specific folder"
-msgstr ""
-
-#: ../deja-dup/AssistantRestore.vala:184
-msgid "Choose destination for restored files"
-msgstr ""
-
-#: ../deja-dup/AssistantRestore.vala:188
-msgid "Restore _folder"
-msgstr ""
-
-#: ../deja-dup/AssistantRestore.vala:229
-msgid "Restore date"
-msgstr ""
-
-#: ../deja-dup/AssistantRestore.vala:237
-msgid "Restore folder"
-msgstr ""
-
-#: ../deja-dup/AssistantRestore.vala:263
-msgid "Checking for Backups…"
-msgstr ""
-
-#: ../deja-dup/AssistantRestore.vala:271
-msgid "Restore From When?"
-msgstr ""
-
-#: ../deja-dup/AssistantRestore.vala:279
-msgid "Restore to Where?"
-msgstr ""
-
-#. Translators: This is the word 'Restoring' in the phrase
-#. "Restoring '%s'". %s is a filename.
-#: ../deja-dup/AssistantRestore.vala:306
-msgid "Restoring:"
-msgstr ""
-
-#. Translators: %x is the current date, %X is the current time.
-#. This will be in a list with other strings that just have %x (the
-#. current date). So make sure if you change this, it still makes
-#. sense in that context.
-#: ../deja-dup/AssistantRestore.vala:348
-#, c-format
-msgid "%x %X"
-msgstr ""
-
-#: ../deja-dup/AssistantRestore.vala:361
-msgid "No backups to restore"
-msgstr ""
-
-#: ../deja-dup/AssistantRestore.vala:437
-msgid "Original location"
-msgstr ""
-
-#: ../deja-dup/AssistantRestore.vala:448
-msgid "File to restore"
-msgid_plural "Files to restore"
-msgstr[0] ""
-msgstr[1] ""
-
-#: ../deja-dup/AssistantRestore.vala:469
-msgid "Restore Failed"
-msgstr ""
-
-#: ../deja-dup/AssistantRestore.vala:471
-msgid "Restore Finished"
-msgstr ""
-
-#: ../deja-dup/AssistantRestore.vala:474
-msgid "Your files were successfully restored."
-msgstr ""
-
-#: ../deja-dup/AssistantRestore.vala:477
-msgid "Your file was successfully restored."
-msgid_plural "Your files were successfully restored."
-msgstr[0] ""
-msgstr[1] ""
-
-#: ../deja-dup/AssistantRestoreMissing.vala:199
-msgid "File"
-msgstr ""
-
-#: ../deja-dup/AssistantRestoreMissing.vala:200
-msgid "Last seen"
-msgstr ""
-
-#: ../deja-dup/AssistantRestoreMissing.vala:215
-msgid "Restore which Files?"
-msgstr ""
-
-#: ../deja-dup/AssistantRestoreMissing.vala:346
-msgid "Scanning for files from up to a day ago…"
-msgstr ""
-
-#: ../deja-dup/AssistantRestoreMissing.vala:349
-msgid "Scanning for files from up to a week ago…"
-msgstr ""
-
-#: ../deja-dup/AssistantRestoreMissing.vala:352
-msgid "Scanning for files from up to a month ago…"
-msgstr ""
-
-#: ../deja-dup/AssistantRestoreMissing.vala:357
-#, c-format
-msgid "Scanning for files from about a month ago…"
-msgid_plural "Scanning for files from about %d months ago…"
-msgstr[0] ""
-msgstr[1] ""
-
-#: ../deja-dup/AssistantRestoreMissing.vala:364
-#, c-format
-msgid "Scanning for files from about a year ago…"
-msgid_plural "Scanning for files from about %d years ago…"
-msgstr[0] ""
-msgstr[1] ""
-
-#: ../deja-dup/AssistantRestoreMissing.vala:454
-msgid "Scanning finished"
-msgstr ""
-
-#: ../deja-dup/Assistant.vala:309
-msgid "Co_ntinue"
-msgstr ""
-
-#: ../deja-dup/Assistant.vala:347 ../deja-dup/StatusIcon.vala:93
-msgid "_Resume Later"
-msgstr ""
-
-#: ../deja-dup/main.vala:34 ../monitor/monitor.vala:36
-#: ../preferences/preferences-main.vala:26
-msgid "Show version"
-msgstr ""
-
-#: ../deja-dup/main.vala:35
-msgid "Restore given files"
-msgstr ""
-
-#: ../deja-dup/main.vala:36
-msgid "Immediately start a backup"
-msgstr ""
-
-#: ../deja-dup/main.vala:38
-msgid "Restore deleted files"
-msgstr ""
-
-#: ../deja-dup/main.vala:55
-msgid "No directory provided"
-msgstr ""
-
-#: ../deja-dup/main.vala:60
-msgid "Only one directory can be shown at once"
-msgstr ""
-
-#: ../deja-dup/main.vala:81
-msgid "[FILES…]"
-msgstr ""
-
-#: ../deja-dup/main.vala:82
-msgid "DIRECTORY"
-msgstr ""
-
-#. Translators: Wrap this to 80 characters per line if you can, as I have for English
-#: ../deja-dup/main.vala:86
-msgid ""
-"Déjà Dup is a simple backup tool. It hides the complexity of backing up\n"
-"the Right Way (encrypted, off-site, and regular) and uses duplicity as\n"
-"the backend."
-msgstr ""
-
-#: ../deja-dup/main.vala:137
-msgid "Directory does not exists"
-msgstr ""
-
-#: ../deja-dup/main.vala:141
-msgid "You must provide a directory, not a file"
-msgstr ""
-
-#: ../deja-dup/main.vala:153
-msgid "You must specify a mode"
-msgstr ""
-
-#: ../deja-dup/MountOperationAssistant.vala:36
-msgid "Connect to Server"
-msgstr ""
-
-#: ../deja-dup/MountOperationAssistant.vala:37
-#: ../widgets/ConfigLocationDAV.vala:49 ../widgets/ConfigLocationFTP.vala:45
-#: ../widgets/ConfigLocationRackspace.vala:31
-#: ../widgets/ConfigLocationSMB.vala:37 ../widgets/ConfigLocationSSH.vala:40
-msgid "_Username"
-msgstr ""
-
-#: ../deja-dup/MountOperationAssistant.vala:38
-msgid "_Password"
-msgstr ""
-
-#: ../deja-dup/MountOperationAssistant.vala:39
-msgid "S_how password"
-msgstr ""
-
-#: ../deja-dup/MountOperationAssistant.vala:80
-msgid "Location not available"
-msgstr ""
-
-#: ../deja-dup/MountOperationAssistant.vala:166
-msgid "Connect _anonymously"
-msgstr ""
-
-#: ../deja-dup/MountOperationAssistant.vala:170
-msgid "Connect as u_ser"
-msgstr ""
-
-#. Translators: this is a Windows networking domain
-#: ../deja-dup/MountOperationAssistant.vala:213
-msgid "_Domain"
-msgstr ""
-
-#: ../deja-dup/Prompt.vala:37
-msgid "Keep your files safe by backing up regularly"
-msgstr ""
-
-#: ../deja-dup/Prompt.vala:42
-msgid ""
-"Important documents, data, and settings can be protected by storing them in "
-"a backup. In the case of a disaster, you would be able to recover them from "
-"that backup."
-msgstr ""
-
-#: ../deja-dup/Prompt.vala:48
-msgid "_Don't Show Again"
-msgstr ""
-
-#: ../deja-dup/Prompt.vala:50
-msgid "Don't Show Again"
-msgstr ""
-
-#: ../deja-dup/Prompt.vala:56
-msgid "_Open Backup Settings"
-msgstr ""
-
-#: ../deja-dup/Prompt.vala:58
-msgid "Open Backup Settings"
-msgstr ""
-
-#: ../deja-dup/StatusIcon.vala:94
-msgid "_Skip Backup"
-msgstr ""
-
-#: ../deja-dup/StatusIcon.vala:125
-msgid "Backup completed"
-msgstr ""
-
-#: ../deja-dup/StatusIcon.vala:129
-msgid "Backup finished"
-msgstr ""
-
-#: ../deja-dup/StatusIcon.vala:130
-msgid ""
-"Not all files were successfully backed up. See dialog for more details."
-msgstr ""
-
-#: ../deja-dup/StatusIcon.vala:232
-msgid "Starting scheduled backup"
-msgstr ""
-
-#: ../deja-dup/StatusIcon.vala:234
-msgid "Show Progress"
-msgstr ""
-
-#: ../deja-dup/StatusIcon.vala:272
-#, c-format
-msgid "%.1f%% complete"
-msgstr ""
-
-#: ../deja-dup/StatusIcon.vala:285
-msgid "Show _Progress"
-msgstr ""
-
-#: ../monitor/monitor.vala:156
-msgid "Scheduled backup delayed"
-msgstr ""
-
-#: ../preferences/Preferences.vala:45
-#, c-format
-msgid "I want to _restore files from a previous backup…"
-msgstr ""
-
-#: ../preferences/Preferences.vala:64
-#, c-format
-msgid "Just show my backup _settings"
-msgstr ""
-
-#: ../preferences/Preferences.vala:134
-msgid "Automatic _backups"
-msgstr ""
-
-#: ../preferences/Preferences.vala:181
-msgid "Most recent backup"
-msgstr ""
-
-#: ../preferences/Preferences.vala:190
-msgid "Next automatic backup"
-msgstr ""
-
-#: ../preferences/Preferences.vala:224
-msgid "_Restore…"
-msgstr ""
-
-#: ../preferences/Preferences.vala:230
-msgid "Back Up _Now"
-msgstr ""
-
-#: ../preferences/Preferences.vala:252
-msgid "Overview"
-msgstr ""
-
-#. Translators: storage as in "where to store the backup"
-#: ../preferences/Preferences.vala:284
-msgid "Storage"
-msgstr ""
-
-#: ../preferences/Preferences.vala:305
-msgid "Folders to _back up"
-msgstr ""
-
-#: ../preferences/Preferences.vala:315
-msgid "Folders to _ignore"
-msgstr ""
-
-#: ../preferences/Preferences.vala:324
-msgid "Folders"
-msgstr ""
-
-#: ../preferences/Preferences.vala:335
-msgid "How _often to back up"
-msgstr ""
-
-#: ../preferences/Preferences.vala:346
-#, c-format
-msgid "_Keep backups"
-msgstr ""
-
-#: ../preferences/Preferences.vala:361
-msgid "Schedule"
-msgstr ""
-
-#: ../preferences/Preferences.vala:365
-msgid "Categories"
-msgstr ""
-
-#: ../tools/duplicity/DuplicityJob.vala:89
-#: ../tools/duplicity/DuplicityJob.vala:173
-msgid "Paused (no network)"
-msgstr ""
-
-#. Was not even a file path (maybe something goofy like computer://)
-#: ../tools/duplicity/DuplicityJob.vala:444
-#, c-format
-msgid "Could not restore ‘%s’: Not a valid file location"
-msgstr ""
-
-#. Tiny backup location. Suggest they get a larger one.
-#: ../tools/duplicity/DuplicityJob.vala:510
-msgid "Backup location is too small. Try using one with more space."
-msgstr ""
-
-#: ../tools/duplicity/DuplicityJob.vala:532
-msgid "Backup location does not have enough free space."
-msgstr ""
-
-#: ../tools/duplicity/DuplicityJob.vala:551
-#: ../tools/duplicity/DuplicityJob.vala:565
-msgid "Cleaning up…"
-msgstr ""
-
-#. OK, we succeeded yay! But some files didn't make it into the backup
-#. because we couldn't read them. So tell the user so they don't think
-#. everything is hunky dory.
-#: ../tools/duplicity/DuplicityJob.vala:661
-msgid ""
-"Could not back up the following files. Please make sure you are able to "
-"open them."
-msgstr ""
-
-#. OK, we succeeded yay! But some files didn't actually restore
-#. because we couldn't write to them. So tell the user so they
-#. don't think everything is hunky dory.
-#: ../tools/duplicity/DuplicityJob.vala:677
-msgid ""
-"Could not restore the following files. Please make sure you are able to "
-"write to them."
-msgstr ""
-
-#: ../tools/duplicity/DuplicityJob.vala:924
-#, c-format
-msgid "Could not restore ‘%s’: File not found in backup"
-msgstr ""
-
-#. notify upper layers, if they want to do anything
-#. Duplicity tried to ask the user what the encryption password is.
-#. notify upper layers, if they want to do anything
-#: ../tools/duplicity/DuplicityJob.vala:930
-#: ../tools/duplicity/DuplicityJob.vala:1028
-#: ../tools/duplicity/DuplicityJob.vala:1032
-msgid "Bad encryption password."
-msgstr ""
-
-#: ../tools/duplicity/DuplicityJob.vala:935
-msgid "Computer name changed"
-msgstr ""
-
-#: ../tools/duplicity/DuplicityJob.vala:935
-#, c-format
-msgid ""
-"The existing backup is of a computer named %s, but the current computer’s "
-"name is %s. If this is unexpected, you should back up to a different "
-"location."
-msgstr ""
-
-#: ../tools/duplicity/DuplicityJob.vala:970
-#, c-format
-msgid "Permission denied when trying to create ‘%s’."
-msgstr ""
-
-#. assume error is on backend side
-#: ../tools/duplicity/DuplicityJob.vala:974
-#: ../tools/duplicity/DuplicityJob.vala:978
-#, c-format
-msgid "Permission denied when trying to read ‘%s’."
-msgstr ""
-
-#: ../tools/duplicity/DuplicityJob.vala:982
-#, c-format
-msgid "Permission denied when trying to delete ‘%s’."
-msgstr ""
-
-#: ../tools/duplicity/DuplicityJob.vala:989
-#, c-format
-msgid "Backup location ‘%s’ does not exist."
-msgstr ""
-
-#: ../tools/duplicity/DuplicityJob.vala:995
-#: ../tools/duplicity/DuplicityJob.vala:1047
-msgid "No space left."
-msgstr ""
-
-#: ../tools/duplicity/DuplicityJob.vala:1009
-msgid "Invalid ID."
-msgstr ""
-
-#: ../tools/duplicity/DuplicityJob.vala:1011
-msgid "Invalid secret key."
-msgstr ""
-
-#: ../tools/duplicity/DuplicityJob.vala:1013
-msgid "Your Amazon Web Services account is not signed up for the S3 service."
-msgstr ""
-
-#: ../tools/duplicity/DuplicityJob.vala:1022
-msgid "S3 bucket name is not available."
-msgstr ""
-
-#: ../tools/duplicity/DuplicityJob.vala:1036
-#, c-format
-msgid "Error reading file ‘%s’."
-msgstr ""
-
-#: ../tools/duplicity/DuplicityJob.vala:1038
-#, c-format
-msgid "Error writing file ‘%s’."
-msgstr ""
-
-#: ../tools/duplicity/DuplicityJob.vala:1049
-#, c-format
-msgid "No space left in ‘%s’."
-msgstr ""
-
-#: ../tools/duplicity/DuplicityJob.vala:1057
-msgid "No backup files found"
-msgstr ""
-
-#: ../tools/duplicity/DuplicityJob.vala:1107
-msgid "Uploading…"
-msgstr ""
-
-#: ../tools/duplicity/DuplicityPlugin.vala:41
-msgid "Could not understand duplicity version."
-msgstr ""
-
-#: ../tools/duplicity/DuplicityPlugin.vala:47
-#, c-format
-msgid "Could not understand duplicity version ‘%s’."
-msgstr ""
-
-#: ../tools/duplicity/DuplicityPlugin.vala:64
-#, c-format
-msgid ""
-"Déjà Dup Backup Tool requires at least version %d.%d.%.2d of duplicity, but "
-"only found version %d.%d.%.2d"
-msgstr ""
-
-#: ../widgets/ConfigDelete.vala:40
-msgid "At least six months"
-msgstr ""
-
-#: ../widgets/ConfigDelete.vala:41
-msgid "At least a year"
-msgstr ""
-
-#: ../widgets/ConfigDelete.vala:42
-msgid "Forever"
-msgstr ""
-
-#: ../widgets/ConfigDelete.vala:89
-#, c-format
-msgid "At least %d day"
-msgid_plural "At least %d days"
-msgstr[0] ""
-msgstr[1] ""
-
-#: ../widgets/ConfigLabelBackupDate.vala:61
-msgid "Today"
-msgstr ""
-
-#: ../widgets/ConfigLabelBackupDate.vala:63
-msgid "Yesterday"
-msgstr ""
-
-#: ../widgets/ConfigLabelBackupDate.vala:65
-msgid "Tomorrow"
-msgstr ""
-
-#: ../widgets/ConfigLabelBackupDate.vala:73
-#, c-format
-msgid "%d day from now"
-msgid_plural "%d days from now"
-msgstr[0] ""
-msgstr[1] ""
-
-#: ../widgets/ConfigLabelBackupDate.vala:83
-#, c-format
-msgid "%d day ago"
-msgid_plural "%d days ago"
-msgstr[0] ""
-msgstr[1] ""
-
-#. Translators: This is used in phrases like "Most recent backup: None"
-#: ../widgets/ConfigLabelBackupDate.vala:95
-#: ../widgets/ConfigLabelBackupDate.vala:109
-msgid "None"
-msgstr ""
-
-#: ../widgets/ConfigLabelBool.vala:34
-msgid "Yes"
-msgstr ""
-
-#: ../widgets/ConfigLabelBool.vala:34
-msgid "No"
-msgstr ""
-
-#: ../widgets/ConfigLabelPolicy.vala:64
-msgid ""
-"Old backups will be kept for at least six months or until the backup "
-"location is low on space."
-msgstr ""
-
-#: ../widgets/ConfigLabelPolicy.vala:66
-msgid ""
-"Old backups will be kept for at least a year or until the backup location is "
-"low on space."
-msgstr ""
-
-#: ../widgets/ConfigLabelPolicy.vala:68
-msgid "Old backups will be kept until the backup location is low on space."
-msgstr ""
-
-#: ../widgets/ConfigLabelPolicy.vala:71
-#, c-format
-msgid ""
-"Old backups will be kept at least %d day or until the backup location is low "
-"on space."
-msgid_plural ""
-"Old backups will be kept at least %d days or until the backup location is "
-"low on space."
-msgstr[0] ""
-msgstr[1] ""
-
-#: ../widgets/ConfigList.vala:179
-msgid "_Add"
-msgstr ""
-
-#: ../widgets/ConfigList.vala:180
-msgid "Add"
-msgstr ""
-
-#: ../widgets/ConfigList.vala:188
-msgid "_Remove"
-msgstr ""
-
-#: ../widgets/ConfigList.vala:189
-msgid "Remove"
-msgstr ""
-
-#: ../widgets/ConfigList.vala:275
-msgid "Choose folders"
-msgstr ""
-
-#: ../widgets/ConfigLocation.vala:118
-msgid "SSH"
-msgstr ""
-
-#: ../widgets/ConfigLocation.vala:120
-msgid "Windows Share"
-msgstr ""
-
-#: ../widgets/ConfigLocation.vala:122
-msgid "FTP"
-msgstr ""
-
-#: ../widgets/ConfigLocation.vala:124
-msgid "WebDAV"
-msgstr ""
-
-#: ../widgets/ConfigLocation.vala:127
-msgid "Custom Location"
-msgstr ""
-
-#. And a local folder option
-#: ../widgets/ConfigLocation.vala:133
-msgid "Local Folder"
-msgstr ""
-
-#: ../widgets/ConfigLocationCustom.vala:33
-msgid "_URI"
-msgstr ""
-
-#: ../widgets/ConfigLocationDAV.vala:31 ../widgets/ConfigLocationFTP.vala:32
-#: ../widgets/ConfigLocationSMB.vala:31 ../widgets/ConfigLocationSSH.vala:31
-msgid "_Server"
-msgstr ""
-
-#: ../widgets/ConfigLocationDAV.vala:38
-msgid "Use secure connection (_HTTPS)"
-msgstr ""
-
-#: ../widgets/ConfigLocationDAV.vala:43 ../widgets/ConfigLocationFTP.vala:35
-#: ../widgets/ConfigLocationSSH.vala:34
-msgid "_Port"
-msgstr ""
-
-#: ../widgets/ConfigLocationDAV.vala:46 ../widgets/ConfigLocationFTP.vala:38
-#: ../widgets/ConfigLocationFile.vala:45 ../widgets/ConfigLocationS3.vala:33
-#: ../widgets/ConfigLocationSMB.vala:34 ../widgets/ConfigLocationSSH.vala:37
-#: ../widgets/ConfigLocationU1.vala:33 ../widgets/ConfigLocationVolume.vala:33
-msgid "_Folder"
-msgstr ""
-
-#: ../widgets/ConfigLocationFile.vala:39
-msgid "_Choose Folder…"
-msgstr ""
-
-#: ../widgets/ConfigLocationFile.vala:50
-msgid "Choose Folder"
-msgstr ""
-
-#: ../widgets/ConfigLocationRackspace.vala:33
-msgid "_Container"
-msgstr ""
-
-#: ../widgets/ConfigLocationS3.vala:31
-msgid "S3 Access Key I_D"
-msgstr ""
-
-#: ../widgets/ConfigLocationSMB.vala:40
-msgid "_Domain Name"
-msgstr ""
-
-#: ../widgets/ConfigPeriod.vala:36
-msgid "Daily"
-msgstr ""
-
-#: ../widgets/ConfigPeriod.vala:37
-msgid "Weekly"
-msgstr ""
-
-#: ../widgets/ConfigPeriod.vala:82
-#, c-format
-msgid "Every %d day"
-msgid_plural "Every %d days"
-msgstr[0] ""
-msgstr[1] ""
-
-#: ../widgets/WidgetUtils.vala:30
-#, c-format
-msgid "Could not display %s"
-msgstr ""
=== modified file 'tests/runner/mock/duplicity'
--- tests/runner/mock/duplicity 2012-08-13 23:03:55 +0000
+++ tests/runner/mock/duplicity 2012-08-20 01:19:22 +0000
@@ -77,6 +77,7 @@
delay = 0
script = ''
passphrase = None
+tmp_archive = False
while len(lines) > curline and lines[curline].strip():
tokens = lines[curline].split()
@@ -90,8 +91,19 @@
script = ' '.join(tokens[1:])
elif tokens[0] == 'PASSPHRASE:':
passphrase = tokens[1] if len(tokens) > 1 else ''
+ elif lines[curline].strip() == 'TMP_ARCHIVE':
+ tmp_archive = True
curline += 1
+if tmp_archive:
+ for i in xrange(len(sys.argv)):
+ split = sys.argv[i].split('=', 1)
+ if len(split) > 1 and split[0] == "--archive-dir":
+ if split[1].find("/cache/") != -1:
+ print >> logfd, "TESTFAIL: expected random /tmp archive dir"
+ sys.exit(-1)
+ sys.argv[i] = "--archive-dir=?"
+
if expected_args != sys.argv[1:]:
print >> logfd, "TESTFAIL: expected\n%s\nvs\n%s" % (expected_args, sys.argv[1:])
sys.exit(-1)
=== modified file 'tests/runner/runner.vala'
--- tests/runner/runner.vala 2012-08-20 01:19:22 +0000
+++ tests/runner/runner.vala 2012-08-20 01:19:22 +0000
@@ -84,8 +84,8 @@
}
}
- if (Posix.system("rm -r %s".printf(Environment.get_variable("DEJA_DUP_TEST_HOME"))) != 0)
- warning("Could not clean TEST_HOME %s", Environment.get_variable("DEJA_DUP_TEST_HOME"));
+// if (Posix.system("rm -r %s".printf(Environment.get_variable("DEJA_DUP_TEST_HOME"))) != 0)
+// warning("Could not clean TEST_HOME %s", Environment.get_variable("DEJA_DUP_TEST_HOME"));
Environment.unset_variable("DEJA_DUP_TEST_MOCKSCRIPT");
Environment.unset_variable("XDG_CACHE_HOME");
@@ -103,21 +103,23 @@
LIST,
}
-string default_args(BackupRunner br, Mode mode = Mode.NONE, bool encrypted = false, string extra = "")
+string default_args(BackupRunner br, Mode mode = Mode.NONE, bool encrypted = false, string extra = "", bool tmp_archive = false)
{
var cachedir = Environment.get_variable("XDG_CACHE_HOME");
var test_home = Environment.get_variable("DEJA_DUP_TEST_HOME");
var backupdir = Path.build_filename(test_home, "backup");
var restoredir = Path.build_filename(test_home, "restore");
+ var archive = tmp_archive ? "?" : "%s/deja-dup".printf(cachedir);
+
if (mode == Mode.CLEANUP)
- return "cleanup '--force' 'file://%s' '--gio' %s'--verbosity=9' '--gpg-options=--no-use-agent' '--archive-dir=%s/deja-dup' '--log-fd=?'".printf(backupdir, encrypted ? "" : "'--no-encryption' ", cachedir);
+ return "cleanup '--force' 'file://%s' '--gio' %s'--verbosity=9' '--gpg-options=--no-use-agent' '--archive-dir=%s' '--log-fd=?'".printf(backupdir, encrypted ? "" : "'--no-encryption' ", archive);
else if (mode == Mode.RESTORE)
- return "'restore' '--gio' '--force' 'file://%s' '%s' %s'--verbosity=9' '--gpg-options=--no-use-agent' '--archive-dir=%s/deja-dup' '--log-fd=?'".printf(backupdir, restoredir, encrypted ? "" : "'--no-encryption' ", cachedir);
+ return "'restore' '--gio' '--force' 'file://%s' '%s' %s'--verbosity=9' '--gpg-options=--no-use-agent' '--archive-dir=%s' '--log-fd=?'".printf(backupdir, restoredir, encrypted ? "" : "'--no-encryption' ", archive);
else if (mode == Mode.VERIFY)
- return "'restore' '--file-to-restore=%s/deja-dup/metadata' '--gio' '--force' 'file://%s' '%s/deja-dup/metadata' %s'--verbosity=9' '--gpg-options=--no-use-agent' '--archive-dir=%s/deja-dup' '--log-fd=?'".printf(cachedir.substring(1), backupdir, cachedir, encrypted ? "" : "'--no-encryption' ", cachedir);
+ return "'restore' '--file-to-restore=%s/deja-dup/metadata' '--gio' '--force' 'file://%s' '%s/deja-dup/metadata' %s'--verbosity=9' '--gpg-options=--no-use-agent' '--archive-dir=%s' '--log-fd=?'".printf(cachedir.substring(1), backupdir, cachedir, encrypted ? "" : "'--no-encryption' ", archive);
else if (mode == Mode.LIST)
- return "'list-current-files' '--gio' 'file://%s' %s'--verbosity=9' '--gpg-options=--no-use-agent' '--archive-dir=%s/deja-dup' '--log-fd=?'".printf(backupdir, encrypted ? "" : "'--no-encryption' ", cachedir);
+ return "'list-current-files' '--gio' 'file://%s' %s'--verbosity=9' '--gpg-options=--no-use-agent' '--archive-dir=%s' '--log-fd=?'".printf(backupdir, encrypted ? "" : "'--no-encryption' ", archive);
string source_str = "";
if (mode == Mode.DRY || mode == Mode.BACKUP)
@@ -164,7 +166,7 @@
args += "'--exclude=%s/deja-dup' '--exclude=%s' '--exclude=**' ".printf(cachedir, cachedir);
}
- args += "%s%s'--gio' %s'file://%s' %s'--verbosity=9' '--gpg-options=--no-use-agent' '--archive-dir=%s/deja-dup' '--log-fd=?'".printf(extra, dry_str, source_str, backupdir, enc_str, cachedir);
+ args += "%s%s'--gio' %s'file://%s' %s'--verbosity=9' '--gpg-options=--no-use-agent' '--archive-dir=%s' '--log-fd=?'".printf(extra, dry_str, source_str, backupdir, enc_str, archive);
return args;
}
@@ -297,14 +299,20 @@
{
var home = Environment.get_home_dir();
var cachedir = Environment.get_variable("XDG_CACHE_HOME");
- return in.replace("@HOME@", home).replace("@XDG_CACHE_HOME@", cachedir);
+ var test_home = Environment.get_variable("DEJA_DUP_TEST_HOME");
+ return in.replace("@HOME@", home).
+ replace("@XDG_CACHE_HOME@", cachedir).
+ replace("@TEST_HOME@", test_home);
}
string run_script(string in)
{
string output;
+ string errstr;
try {
- Process.spawn_sync(null, {"/bin/sh", "-c", in}, null, 0, null, out output, null, null);
+ Process.spawn_sync(null, {"/bin/sh", "-c", in}, null, 0, null, out output, out errstr, null);
+ if (errstr != null && errstr != "")
+ warning("Error running script: %s", errstr);
}
catch (SpawnError e) {
warning(e.message);
@@ -343,6 +351,22 @@
br.error_detail = keyfile.get_string(group, "ErrorDetail");
if (keyfile.has_key(group, "Passphrases"))
br.passphrases = keyfile.get_integer(group, "Passphrases");
+ if (keyfile.has_key(group, "Settings")) {
+ var settings_list = keyfile.get_string_list(group, "Settings");
+ var settings = DejaDup.get_settings();
+ foreach (var setting in settings_list) {
+ try {
+ var tokens = setting.split("=");
+ var key = tokens[0];
+ var val = Variant.parse(null, tokens[1]);
+ settings.set_value(key, val);
+ }
+ catch (Error e) {
+ warning("%s\n", e.message);
+ assert_not_reached();
+ }
+ }
+ }
}
void process_duplicity_run_block(KeyFile keyfile, string run, BackupRunner br) throws Error
@@ -353,6 +377,7 @@
bool cancel = false;
bool stop = false;
bool passphrase = false;
+ bool tmp_archive = false;
string script = null;
Mode mode = Mode.NONE;
@@ -361,6 +386,8 @@
var group = "Duplicity " + run;
if (keyfile.has_group(group)) {
+ if (keyfile.has_key(group, "ArchiveDirIsTmp"))
+ tmp_archive = keyfile.get_boolean(group, "ArchiveDirIsTmp");
if (keyfile.has_key(group, "Cancel"))
cancel = keyfile.get_boolean(group, "Cancel");
if (keyfile.has_key(group, "Encrypted"))
@@ -403,7 +430,10 @@
var cachedir = Environment.get_variable("XDG_CACHE_HOME");
- var dupscript = "ARGS: " + default_args(br, mode, encrypted, extra_args);
+ var dupscript = "ARGS: " + default_args(br, mode, encrypted, extra_args, tmp_archive);
+
+ if (tmp_archive)
+ dupscript += "\n" + "TMP_ARCHIVE";
if (cancel) {
dupscript += "\n" + "DELAY: 10";
=== added file 'tests/scripts/nag.test'
--- tests/scripts/nag.test 1970-01-01 00:00:00 +0000
+++ tests/scripts/nag.test 2012-08-20 01:19:22 +0000
@@ -0,0 +1,58 @@
+# Tests whether we correctly nag the user about their password during some
+# verify checks.
+
+[Operation]
+Type=backup
+Settings=nag-check='1970-01-01T00:32:08.916885Z'
+Passphrases=2
+
+[Duplicity]
+Runs=status 1;status 2;dry;backup;status-restore 1;status-restore 2;list;verify;
+
+[Duplicity status 1]
+#DEBUG 1
+#. ['duplicity.gpg']
+#
+#ERROR 31
+Output=true
+
+[Duplicity status 2]
+#DEBUG 1
+#. ['duplicity.gpg']
+Output=true
+Encrypted=true
+Passphrase=true
+
+[Duplicity dry]
+Encrypted=true
+Passphrase=true
+
+[Duplicity backup]
+Encrypted=true
+Passphrase=true
+
+[Duplicity status-restore 1]
+#DEBUG 1
+#. ['duplicity.gpg']
+#
+#ERROR 31
+Output=true
+ArchiveDirIsTmp=true
+
+[Duplicity status-restore 2]
+#DEBUG 1
+#. ['duplicity.gpg']
+Output=true
+Encrypted=true
+Passphrase=true
+ArchiveDirIsTmp=true
+
+[Duplicity list]
+Encrypted=true
+Passphrase=true
+ArchiveDirIsTmp=true
+
+[Duplicity verify]
+Encrypted=true
+Passphrase=true
+ArchiveDirIsTmp=true
=== modified file 'tools/duplicity/DuplicityInstance.vala'
--- tools/duplicity/DuplicityInstance.vala 2012-08-20 01:19:22 +0000
+++ tools/duplicity/DuplicityInstance.vala 2012-08-20 01:19:22 +0000
@@ -27,6 +27,7 @@
string user_text);
public bool verbose {get; private set; default = false;}
+ public string forced_cache_dir {get; set; default = null;}
public virtual void start(List<string> argv_in, List<string>? envp_in,
bool as_root = false) throws Error
@@ -71,7 +72,9 @@
argv.append("--gpg-options=--no-use-agent");
// Cache signature files
- var cache_dir = Environment.get_user_cache_dir();
+ var cache_dir = forced_cache_dir;
+ if (cache_dir == null)
+ cache_dir = Environment.get_user_cache_dir();
if (cache_dir != null) {
bool add_dir = false;
var cache_file = File.new_for_path(cache_dir);
=== modified file 'tools/duplicity/DuplicityJob.vala'
--- tools/duplicity/DuplicityJob.vala 2012-08-20 01:19:22 +0000
+++ tools/duplicity/DuplicityJob.vala 2012-08-20 01:19:22 +0000
@@ -80,6 +80,7 @@
int delete_age = 0;
File last_touched_file = null;
+ string forced_cache_dir = null;
void network_changed()
{
@@ -109,6 +110,9 @@
~DuplicityJob() {
DejaDup.Network.get().notify["connected"].disconnect(network_changed);
+
+ if (forced_cache_dir != null)
+ new DejaDup.RecursiveDelete(File.new_for_path(forced_cache_dir)).start_async.begin();
}
public override void start()
@@ -125,7 +129,17 @@
if (mode == DejaDup.ToolJob.Mode.BACKUP)
process_include_excludes();
-
+
+ /* Fake cache dir if we need to */
+ if ((flags & DejaDup.ToolJob.Flags.NO_CACHE) != 0) {
+ try {
+ forced_cache_dir = DirUtils.make_tmp("deja-dup-XXXXXX");
+ }
+ catch (Error e) {
+ warning("%s\n", e.message);
+ }
+ }
+
var settings = DejaDup.get_settings();
delete_age = settings.get_int(DejaDup.DELETE_AFTER_KEY);
@@ -1372,6 +1386,9 @@
inst = new DuplicityInstance();
inst.done.connect(handle_done);
+ if (forced_cache_dir != null)
+ inst.forced_cache_dir = forced_cache_dir;
+
/* As duplicity's data is returned via a signal, handle_message begins post-raw stream processing */
inst.message.connect(handle_message);
Follow ups