Merge pull request #422 from tewha/master

Fix to pull 420
This commit is contained in:
Mattt Thompson 2012-07-23 17:03:28 -07:00
commit 877333a08e
3 changed files with 4 additions and 4 deletions

View file

@ -722,7 +722,7 @@ static inline NSString * AFMultipartFormFinalBoundary() {
self.request = request; self.request = request;
self.stringEncoding = encoding; self.stringEncoding = encoding;
self.temporaryFilePath = [AFMultipartTemporaryFileDirectoryPath() stringByAppendingPathComponent:[NSString stringWithFormat:@"%lu", [[self.request URL] hash]]]; self.temporaryFilePath = [AFMultipartTemporaryFileDirectoryPath() stringByAppendingPathComponent:[NSString stringWithFormat:@"%lu", (long)[[self.request URL] hash]]];
self.outputStream = [NSOutputStream outputStreamToFileAtPath:self.temporaryFilePath append:NO]; self.outputStream = [NSOutputStream outputStreamToFileAtPath:self.temporaryFilePath append:NO];
NSRunLoop *runLoop = [NSRunLoop currentRunLoop]; NSRunLoop *runLoop = [NSRunLoop currentRunLoop];

View file

@ -77,11 +77,11 @@ static NSString * AFStringFromIndexSet(NSIndexSet *indexSet) {
} }
if (range.length == 1) { if (range.length == 1) {
[string appendFormat:@"%lu", range.location]; [string appendFormat:@"%lu", (long)range.location];
} else { } else {
NSUInteger firstIndex = range.location; NSUInteger firstIndex = range.location;
NSUInteger lastIndex = firstIndex + range.length - 1; NSUInteger lastIndex = firstIndex + range.length - 1;
[string appendFormat:@"%lu-%lu", firstIndex, lastIndex]; [string appendFormat:@"%lu-%lu", (long)firstIndex, (long)lastIndex];
} }
range.location = nextIndex; range.location = nextIndex;

View file

@ -67,7 +67,7 @@
#if __IPHONE_OS_VERSION_MIN_REQUIRED #if __IPHONE_OS_VERSION_MIN_REQUIRED
[[[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Error", nil) message:[error localizedDescription] delegate:nil cancelButtonTitle:nil otherButtonTitles:NSLocalizedString(@"OK", nil), nil] show]; [[[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Error", nil) message:[error localizedDescription] delegate:nil cancelButtonTitle:nil otherButtonTitles:NSLocalizedString(@"OK", nil), nil] show];
#else #else
[[NSAlert alertWithMessageText:NSLocalizedString(@"Error", nil) defaultButton:NSLocalizedString(@"OK", nil) alternateButton:nil otherButton:nil informativeTextWithFormat:[error localizedDescription]] runModal]; [[NSAlert alertWithMessageText:NSLocalizedString(@"Error", nil) defaultButton:NSLocalizedString(@"OK", nil) alternateButton:nil otherButton:nil informativeTextWithFormat:@"%@",[error localizedDescription]] runModal];
#endif #endif
if (block) { if (block) {
block(nil); block(nil);