Chromium Code Reviews| 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."; |