Changeset 2516


Ignore:
Timestamp:
Jul 27, 2007, 9:01:48 PM (15 years ago)
Author:
livings124
Message:

don't allow creation of torrent files with total size of zero bytes

Location:
trunk/macosx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/CreatorWindowController.m

    r2295 r2516  
    6262        fPath = [path retain];
    6363        fInfo = tr_metaInfoBuilderCreate(handle, [fPath UTF8String]);
     64       
    6465        if (fInfo->fileCount == 0)
    6566        {
     
    7071            [alert setInformativeText: NSLocalizedString(@"There must be at least one file in a folder to create a torrent file.",
    7172                                                        "Create torrent -> no files -> warning")];
     73            [alert setAlertStyle: NSWarningAlertStyle];
     74           
     75            [alert runModal];
     76            [alert release];
     77           
     78            [self release];
     79            return nil;
     80        }
     81        if (fInfo->totalSize == 0)
     82        {
     83            NSAlert * alert = [[NSAlert alloc] init];
     84            [alert addButtonWithTitle: NSLocalizedString(@"OK", "Create torrent -> zero size -> button")];
     85            [alert setMessageText: NSLocalizedString(@"The total file size is zero bytes.",
     86                                                    "Create torrent -> zero size -> title")];
     87            [alert setInformativeText: NSLocalizedString(@"A torrent file cannot be created for files with no size.",
     88                                                        "Create torrent -> zero size -> warning")];
    7289            [alert setAlertStyle: NSWarningAlertStyle];
    7390           
  • trunk/macosx/English.lproj/Localizable.strings

    r2475 r2516  
    125125/* Move inside itself alert -> title */
    126126"A folder cannot be moved to inside itself." = "A folder cannot be moved to inside itself.";
     127
     128/* Create torrent -> zero size -> warning */
     129"A torrent file cannot be created for files with no size." = "A torrent file cannot be created for files with no size.";
    127130
    128131/* Create torrent -> file already exists warning -> title */
     
    313316   Debug log alert -> button
    314317   Download not a torrent -> button
     318   Create torrent -> zero size -> button
    315319   Move inside itself alert -> button
    316    Create torrent -> http warning -> button
    317    Save log alert panel -> button */
     320   Save log alert panel -> button
     321   Create torrent -> http warning -> button */
    318322"OK" = "OK";
    319323
     
    414418"Seeding" = "Seeding";
    415419
     420/* Torrent -> status string */
     421"Seeding complete" = "Seeding complete";
     422
    416423/* Growl notification title */
    417424"Seeding Complete" = "Seeding Complete";
    418 
    419 /* Torrent -> status string */
    420 "Seeding complete" = "Seeding complete";
    421425
    422426/* Torrent -> status string */
     
    505509"The torrent file cannot be opened because it is a duplicate of an already running transfer." = "The torrent file cannot be opened because it is a duplicate of an already running transfer.";
    506510
     511/* Create torrent -> zero size -> title */
     512"The total file size is zero bytes." = "The total file size is zero bytes.";
     513
    507514/* Create torrent -> no url warning -> title */
    508515"The tracker address cannot be blank." = "The tracker address cannot be blank.";
Note: See TracChangeset for help on using the changeset viewer.