Permalink
Browse files

Changed the timeout before a file gets migrated out of iCloud and bac…

…k in again to 12 hours. Also improved the predicate used to for metadata query to download new cloud files.
  • Loading branch information...
1 parent 5eadbb8 commit faff20fc38c168fce9a1ede39d533e923caef707 @drewmccormack committed Mar 22, 2013
@@ -155,7 +155,7 @@ - (void)refreshCloudMetadataQuery
{
NSMetadataQuery *newQuery = [[[NSMetadataQuery alloc] init] autorelease];
newQuery.searchScopes = [NSArray arrayWithObject:NSMetadataQueryUbiquitousDataScope];
- newQuery.predicate = [NSPredicate predicateWithFormat:@"%K like '*'", NSMetadataItemFSNameKey];
+ newQuery.predicate = [NSPredicate predicateWithFormat:@"%K = FALSE OR %K = FALSE", NSMetadataUbiquitousItemIsDownloadedKey, NSMetadataUbiquitousItemIsUploadedKey];
newQuery.notificationBatchingInterval = 60.0;
self.cloudMetadataQuery = newQuery;
}
@@ -186,7 +186,7 @@ - (void)checkUninitiatedUploadsForURLs:(NSArray *)urls
if ( ![fm createDirectoryAtPath:tempDirPath withIntermediateDirectories:YES attributes:nil error:NULL] ) return;
// Check for files that should be uploaded, but have gotten 'stuck'.
- const NSTimeInterval ReuploadTimeInterval = 30*60; // 30 minutes
+ const NSTimeInterval ReuploadTimeInterval = 720*60; // 12 hours
for ( NSURL *url in urls ) {
@autoreleasepool {
NSDictionary *fileAttributes = [fm attributesOfItemAtPath:url.path error:NULL];

0 comments on commit faff20f

Please sign in to comment.