Pierre-Olivier Latour 11 gadi atpakaļ
vecāks
revīzija
d68687af62
1 mainītis faili ar 5 papildinājumiem un 1 dzēšanām
  1. 5 1
      GCDWebUploader/GCDWebUploader.m

+ 5 - 1
GCDWebUploader/GCDWebUploader.m

@@ -88,7 +88,11 @@
       return nil;
       return nil;
     }
     }
     _uploadDirectory = [[path stringByStandardizingPath] copy];
     _uploadDirectory = [[path stringByStandardizingPath] copy];
-    GCDWebUploader* __unsafe_unretained uploader = self;  // Avoid retain-cycles with self
+#if __has_feature(objc_arc)
+    __unsafe_unretained GCDWebUploader* uploader = self;
+#else
+    __block GCDWebUploader* server = self;
+#endif
     
     
     // Resource files
     // Resource files
     [self addGETHandlerForBasePath:@"/" directoryPath:[siteBundle resourcePath] indexFilename:nil cacheAge:3600 allowRangeRequests:NO];
     [self addGETHandlerForBasePath:@"/" directoryPath:[siteBundle resourcePath] indexFilename:nil cacheAge:3600 allowRangeRequests:NO];