Changeset 1306 for trunk/dll/arccnrs.c


Ignore:
Timestamp:
Nov 30, 2008, 8:23:56 PM (17 years ago)
Author:
Gregg Young
Message:

Added option to use subdirectory based on the archive name for extraction from the arc container; it is set in the notebook and separate from the extract dialog setting; includes help file update, comments and cleanup (Ticket 22)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/arccnrs.c

    r1301 r1306  
    6464  29 Nov 08 GKY Add flag to tell CheckListProc file is in an archive so it won't try to open it.
    6565  29 Nov 08 GKY Remove or replace with a mutex semaphore DosEnterCriSec where appropriate.
     66  30 Nov 08 GKY Add the option of creating a subdirectory from the arcname
     67                for the extract path to arc container.
    6668
    6769***********************************************************************/
     
    158160CHAR ArcTempRoot[CCHMAXPATH];
    159161BOOL fArcStuffVisible;
     162BOOL fFileNameCnrPath;
    160163
    161164#pragma data_seg(GLOBAL2)
     
    18181821
    18191822              for (x = 0; li->list[x]; x++) {
    1820                 BldFullPathName(fullname, li->targetpath, li->list[x]);
     1823                BldFullPathName(fullname, li->targetpath, li->list[x]);
     1824                //Check if file already exists on disk warn if it does.
    18211825                if (IsFile(fullname) != -1) {
    18221826                  AddToList(li->list[x], &exfiles, &numfiles, &numalloc);
     
    18501854                else if (ckl.list)
    18511855                  li->list = CombineLists(li->list, ckl.list);
    1852               }
     1856              } // end check and warn
    18531857            }
    18541858            if (!li->list || !li->list[0])
     
    37143718          else
    37153719            strcpy(dcd->directory, extractpath);
    3716         }
     3720        }
     3721        if (!*dcd->directory && fFileNameCnrPath && dcd->arcname) {
     3722
     3723          strcpy(fullname, dcd->arcname);
     3724          p = strrchr(fullname, '.');
     3725          if (p)
     3726           *p = 0;
     3727          else {
     3728            p = fullname + strlen(dcd->arcname);
     3729            p--;
     3730            *p = 0;
     3731          }
     3732          strcpy(dcd->directory, fullname);
     3733        }
    37173734        if (!*dcd->directory && *lastextractpath) {
    37183735          //DosEnterCritSec();  //GKY 11-29-08
Note: See TracChangeset for help on using the changeset viewer.