Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3702)

Unified Diff: base/mac/mac_util.mm

Issue 6990066: Mac TimeMachine File Exclusions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/mac/mac_util_unittest.mm » ('j') | base/mac/mac_util_unittest.mm » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/mac/mac_util.mm
===================================================================
--- base/mac/mac_util.mm (revision 86429)
+++ base/mac/mac_util.mm (working copy)
@@ -268,13 +268,14 @@
}
NSURL* url = [NSURL fileURLWithPath:filePath];
- // Note that we always set CSBackupSetItemExcluded's excludeByPath param
- // to true. This prevents a problem with toggling the setting: if the file
- // is excluded with excludeByPath set to true then excludeByPath must
- // also be true when un-excluding the file, otherwise the un-excluding
- // will be ignored.
+ // When excludeByPath is true the application must be running with root
+ // privileges (admin for 10.6 and earlier) but the URL does not have to
+ // already exist. When excludeByPath is false the URL must already exist but
+ // can be used in non-root (or admin as above) mode. We use false so that
+ // non-root (or admin) users don't get their TimeMachine drive filled up with
+ // unnecessary backups.
bool success =
- CSBackupSetItemExcluded((CFURLRef)url, exclude, true) == noErr;
+ CSBackupSetItemExcluded((CFURLRef)url, exclude, false) == noErr;
if (!success)
Mark Mentovai 2011/05/25 01:14:35 Style nit (present in the existing code): this nee
mrossetti 2011/05/26 21:02:40 Done.
LOG(WARNING) << "Failed to set backup exclusion for file '"
<< file_path.value().c_str() << "'. Continuing.";
« no previous file with comments | « no previous file | base/mac/mac_util_unittest.mm » ('j') | base/mac/mac_util_unittest.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698