Skip to content

Commit

Permalink
Re-indent and whitespace fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
hjuutilainen committed Dec 13, 2013
1 parent fa6d9c2 commit 20480f1
Show file tree
Hide file tree
Showing 6 changed files with 166 additions and 181 deletions.
25 changes: 12 additions & 13 deletions MunkiAdmin/NSOperation Subclasses/FileCopyOperation.m
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,18 @@ - (id)initWithSourceURL:(NSURL *)src targetURL:(NSURL *)target {
-(void)main {
@try {
@autoreleasepool {
NSFileManager *fm = [NSFileManager defaultManager];
//NSFileManager *fm = [[NSFileManager alloc] init];
[fm setDelegate:self];
NSError *copyError = nil;

if ([self.defaults boolForKey:@"debug"]) NSLog(@"Copying %@ to %@", self.fileName, [self.targetURL relativePath]);

if ([fm copyItemAtURL:self.sourceURL toURL:self.targetURL error:&copyError]) {
if ([self.defaults boolForKey:@"debug"]) NSLog(@"Done copying");
} else {
if ([self.defaults boolForKey:@"debug"]) NSLog(@"Copy failed with error: %@",[copyError description]);
}

NSFileManager *fm = [NSFileManager defaultManager];
[fm setDelegate:self];
NSError *copyError = nil;

if ([self.defaults boolForKey:@"debug"]) NSLog(@"Copying %@ to %@", self.fileName, [self.targetURL relativePath]);

if ([fm copyItemAtURL:self.sourceURL toURL:self.targetURL error:&copyError]) {
if ([self.defaults boolForKey:@"debug"]) NSLog(@"Done copying");
} else {
if ([self.defaults boolForKey:@"debug"]) NSLog(@"Copy failed with error: %@",[copyError description]);
}

}
}
@catch(...) {
Expand Down
8 changes: 4 additions & 4 deletions MunkiAdmin/NSOperation Subclasses/ManifestScanner.m
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ - (id)initWithURL:(NSURL *)src {
}


- (void)contextDidSave:(NSNotification*)notification
- (void)contextDidSave:(NSNotification*)notification
{
[[self delegate] performSelectorOnMainThread:@selector(mergeChanges:)
withObject:notification
[[self delegate] performSelectorOnMainThread:@selector(mergeChanges:)
withObject:notification
waitUntilDone:YES];
}

Expand Down Expand Up @@ -339,7 +339,7 @@ -(void)main {
}

if ([self.delegate respondsToSelector:@selector(scannerDidProcessPkginfo)]) {
[self.delegate performSelectorOnMainThread:@selector(scannerDidProcessPkginfo)
[self.delegate performSelectorOnMainThread:@selector(scannerDidProcessPkginfo)
withObject:nil
waitUntilDone:YES];
}
Expand Down
14 changes: 7 additions & 7 deletions MunkiAdmin/NSOperation Subclasses/MunkiOperation.m
Original file line number Diff line number Diff line change
Expand Up @@ -133,30 +133,30 @@ - (NSDictionary *)makepkginfo
-(void)main {
@try {
@autoreleasepool {
if ([self.command isEqualToString:@"makecatalogs"]) {
NSString *results = [self makeCatalogs];
if ([self.defaults boolForKey:@"debug"]) NSLog(@"MunkiOperation:makecatalogs");
if ([self.defaults boolForKey:@"debug"]) NSLog(@"MunkiOperation:makecatalogs");
if ([self.defaults boolForKey:@"debugLogAllProperties"]) NSLog(@"MunkiOperation:makecatalogs:results: %@", results);
}

else if ([self.command isEqualToString:@"makepkginfo"]) {
NSDictionary *pkginfo = [self makepkginfo];
if ([self.defaults boolForKey:@"debug"]) NSLog(@"MunkiOperation:makepkginfo");
if ([self.defaults boolForKey:@"debug"]) NSLog(@"MunkiOperation:makepkginfo");
if ([self.defaults boolForKey:@"debugLogAllProperties"]) NSLog(@"MunkiOperation:makepkginfo:results: %@", pkginfo);
if ([self.delegate respondsToSelector:@selector(makepkginfoDidFinish:)]) {
[self.delegate performSelectorOnMainThread:@selector(makepkginfoDidFinish:)
[self.delegate performSelectorOnMainThread:@selector(makepkginfoDidFinish:)
withObject:pkginfo
waitUntilDone:YES];
}
}

else if ([self.command isEqualToString:@"installsitem"]) {
NSDictionary *pkginfo = [self makepkginfo];
if ([self.defaults boolForKey:@"debug"]) NSLog(@"MunkiOperation:installsitem");
if ([self.defaults boolForKey:@"debug"]) NSLog(@"MunkiOperation:installsitem");
if ([self.defaults boolForKey:@"debugLogAllProperties"]) NSLog(@"MunkiOperation:makepkginfo:results: %@", pkginfo);
if ([self.delegate respondsToSelector:@selector(installsItemDidFinish:)]) {
[self.delegate performSelectorOnMainThread:@selector(installsItemDidFinish:)
[self.delegate performSelectorOnMainThread:@selector(installsItemDidFinish:)
withObject:pkginfo
waitUntilDone:YES];
}
Expand All @@ -165,7 +165,7 @@ -(void)main {
else {
NSLog(@"Command not recognized: %@", self.command);
}
}
}
@catch(...) {
Expand Down
Loading

0 comments on commit 20480f1

Please sign in to comment.