deja-dup-team team mailing list archive
-
deja-dup-team team
-
Mailing list archive
-
Message #00521
[Merge] lp:~mterry/deja-dup/ignore-steam into lp:deja-dup
Michael Terry has proposed merging lp:~mterry/deja-dup/ignore-steam into lp:deja-dup.
Requested reviews:
Robert Bruce Park (robru)
Related bugs:
Bug #1083237 in Déjà Dup: "Ignore Steam files by default"
https://bugs.launchpad.net/deja-dup/+bug/1083237
For more details, see:
https://code.launchpad.net/~mterry/deja-dup/ignore-steam/+merge/136223
This is a simple one-liner change to the code to ignore ~/.steam/root if it exists. ~/.steam/root points at ~/Steam by default.
I also added code to the test runner to handle Steam being installed or not correctly. And a line in the help documentation to note that we do this.
--
https://code.launchpad.net/~mterry/deja-dup/ignore-steam/+merge/136223
Your team Déjà Dup Developers is subscribed to branch lp:deja-dup.
=== modified file 'common/OperationBackup.vala'
--- common/OperationBackup.vala 2012-08-13 19:59:00 +0000
+++ common/OperationBackup.vala 2012-11-26 17:07:29 +0000
@@ -112,6 +112,7 @@
rv.append(Path.build_filename(dir, ".Private")); // encrypted copies of stuff in $HOME
rv.append(Path.build_filename(dir, ".recent-applications.xbel"));
rv.append(Path.build_filename(dir, ".recently-used.xbel"));
+ rv.append(Path.build_filename(dir, ".steam/root"));
rv.append(Path.build_filename(dir, ".thumbnails"));
rv.append(Path.build_filename(dir, ".xsession-errors"));
}
=== modified file 'help/C/prefs.page'
--- help/C/prefs.page 2011-10-11 14:04:26 +0000
+++ help/C/prefs.page 2012-11-26 17:07:29 +0000
@@ -54,6 +54,7 @@
<item><p><file>~/.Private</file></p></item>
<item><p><file>~/.recent-applications.xbel</file></p></item>
<item><p><file>~/.recently-used.xbel</file></p></item>
+ <item><p><file>~/.steam/root</file> (which by default also ignores <file>~/Steam</file>)</p></item>
<item><p><file>~/.thumbnails</file></p></item>
<item><p><file>~/.xsession-errors</file></p></item>
<item><p><file>/proc</file></p></item>
=== modified file 'tests/runner.vala'
--- tests/runner.vala 2012-11-01 17:33:50 +0000
+++ tests/runner.vala 2012-11-26 17:07:29 +0000
@@ -178,13 +178,29 @@
if (mode == Mode.STATUS || mode == Mode.NONE || mode == Mode.DRY || mode == Mode.BACKUP) {
args += "'--exclude=%s' '--include=%s/deja-dup/metadata' ".printf(backupdir, cachedir);
- string[] excludes1 = {"~/Downloads", "~/.local/share/Trash", "~/.xsession-errors", "~/.thumbnails", "~/.Private", "~/.gvfs", "~/.adobe/Flash_Player/AssetCache"};
+ string[] excludes1 = {"~/Downloads", "~/.local/share/Trash", "~/.xsession-errors", "~/.thumbnails", "~/.steam/root", "~/.Private", "~/.gvfs", "~/.adobe/Flash_Player/AssetCache"};
foreach (string ex in excludes1) {
ex = ex.replace("~", Environment.get_home_dir());
- if (FileUtils.test (ex, FileTest.EXISTS))
+ if (FileUtils.test (ex, FileTest.IS_SYMLINK | FileTest.EXISTS))
args += "'--exclude=%s' ".printf(ex);
}
+ string[] symlinks = {"~/.steam/root"};
+ foreach (string sym in symlinks) {
+ sym = sym.replace("~", Environment.get_home_dir());
+ if (FileUtils.test (sym, FileTest.IS_SYMLINK) &&
+ FileUtils.test (sym, FileTest.EXISTS)) {
+ try {
+ sym = FileUtils.read_link (sym);
+ sym = Filename.to_utf8 (sym, -1, null, null);
+ args += "'--exclude=%s' ".printf(sym);
+ }
+ catch (Error e) {
+ assert_not_reached();
+ }
+ }
+ }
+
args += "'--include=%s' ".printf(Environment.get_home_dir());
args += include_args;
Follow ups