Changeset 1791 for trunk/dll/extract.c


Ignore:
Timestamp:
Aug 31, 2014, 8:13:17 PM (11 years ago)
Author:
Gregg Young
Message:

Fix failure to remove leading quote on toogle of extract directory to and from using file name. Ticket [495]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/extract.c

    r1717 r1791  
    2323                if the name needed quoting.
    2424  15 Feb 14 GKY Assure the title is blank on the execute dialog call with the "see" button
     25  31 Aug 14 GKY Fix failure to remove leading quote on toogle of extract directory to and
     26                from using file name.
    2527
    2628***********************************************************************/
     
    165167          p--;
    166168          *p = 0;
    167           if (strchr(FileName, '\"'))
     169          if (strchr(FileName, '\"') == strrchr(FileName, '\"'))
    168170            memmove(FileName , FileName + 1, strlen(FileName) + 1);
    169171        }
     
    307309            *p = 0;
    308310            if (strchr(FileName, '\"'))
    309             memmove(FileName, FileName + 1, strlen(FileName) + 1);
     311              memmove(FileName, FileName + 1, strlen(FileName) + 1);
    310312          }
    311313          else {
     
    313315            p--;
    314316            *p = 0;
    315             if (strchr(FileName, '\"'))
    316             memmove(FileName, FileName + 1, strlen(FileName) + 1);
     317            if (strchr(FileName, '\"') == strrchr(FileName, '\"'))
     318              memmove(FileName, FileName + 1, strlen(FileName) + 1);
    317319          }
    318320          strcpy(arcdata->extractdir, FileName);
     
    354356              strcpy(arcdata->extractdir, pFM2SaveDirectory);
    355357          }
     358          if (strchr(arcdata->extractdir, '\"') == strrchr(arcdata->extractdir, '\"'))
     359            memmove(arcdata->extractdir, arcdata->extractdir + 1,
     360                    strlen(arcdata->extractdir) + 1);
    356361          WinSetDlgItemText(hwnd, EXT_DIRECTORY, arcdata->extractdir);
    357362        }
Note: See TracChangeset for help on using the changeset viewer.