~stuart-morgan/sparkle/loc-link-fix

« back to all changes in this revision

Viewing changes to SUBasicUpdateDriver.m

  • Committer: Andy Matuschak
  • Date: 2009-01-10 02:57:29 UTC
  • Revision ID: andy@andymatuschak.org-20090110025729-mjtjm7ix7ehhiele
Improving Sparkle's robustness against apps without a CFBundleVersion.

Show diffs side-by-side

added added

removed removed

Lines of Context:
142
142
        NSString *prefix = [NSString stringWithFormat:@"%@ %@ Update", [host name], [host version]];
143
143
        NSString *tempDir = [NSTemporaryDirectory() stringByAppendingPathComponent:prefix];
144
144
        int cnt=1;
145
 
        while ([[NSFileManager defaultManager] fileExistsAtPath:tempDir] && cnt <= 999999)
 
145
        while ([[NSFileManager defaultManager] fileExistsAtPath:tempDir] && cnt <= 999)
146
146
                tempDir = [NSTemporaryDirectory() stringByAppendingPathComponent:[NSString stringWithFormat:@"%@ %d", prefix, cnt++]];
147
147
        BOOL success = [[NSFileManager defaultManager] createDirectoryAtPath:tempDir attributes:nil];
148
148
        if (!success)