Skip to content
This repository has been archived by the owner on Jan 3, 2019. It is now read-only.

Commit

Permalink
[#42] always wait for NSTasks to finish first
Browse files Browse the repository at this point in the history
  • Loading branch information
mackuba committed Jan 4, 2014
1 parent c1bb797 commit f89d36b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions Hive/Backend/Backups/HIDropboxBackup.m
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ - (NSString *)dropboxFolder {
task.standardError = [NSPipe pipe];

[task launch];
[task waitUntilExit];

NSData *outputData = [[task.standardOutput fileHandleForReading] readDataToEndOfFile];
NSString *output = [[NSString alloc] initWithData:outputData encoding:NSUTF8StringEncoding];
Expand Down
1 change: 1 addition & 0 deletions Hive/Backend/Backups/HITimeMachineBackup.m
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ - (BOOL)isExcludedFromBackup {
task.standardOutput = [NSPipe pipe];

[task launch];
[task waitUntilExit];

NSData *outputData = [[task.standardOutput fileHandleForReading] readDataToEndOfFile];
NSString *output = [[NSString alloc] initWithData:outputData encoding:NSUTF8StringEncoding];
Expand Down

0 comments on commit f89d36b

Please sign in to comment.